C# Class PowerArgs.StringEx

string extension methods
Afficher le fichier Open project: adamabdelhamed/PowerArgs

Méthodes publiques

Méthode Description
ToBlack ( this s, ConsoleColor bg = null ) : ConsoleString

Changes the foreground of this string to black, and optionally forces the background of all characters to the given color.

ToBlue ( this s, ConsoleColor bg = null ) : ConsoleString

Changes the foreground of this string to blue, and optionally forces the background of all characters to the given color.

ToConsoleString ( this s, ConsoleColor fg = null, ConsoleColor bg = null ) : ConsoleString

Converts a string to a ConsoleString

ToCyan ( this s, ConsoleColor bg = null ) : ConsoleString

Changes the foreground of this string to cyan, and optionally forces the background of all characters to the given color.

ToDarkBlue ( this s, ConsoleColor bg = null ) : ConsoleString

Changes the foreground of this string to dark blue, and optionally forces the background of all characters to the given color.

ToDarkCyan ( this s, ConsoleColor bg = null ) : ConsoleString

Changes the foreground of this string to dark cyan, and optionally forces the background of all characters to the given color.

ToDarkGray ( this s, ConsoleColor bg = null ) : ConsoleString

Changes the foreground of this string to dark gray, and optionally forces the background of all characters to the given color.

ToDarkGreen ( this s, ConsoleColor bg = null ) : ConsoleString

Changes the foreground of this string to dark green, and optionally forces the background of all characters to the given color.

ToDarkMagenta ( this s, ConsoleColor bg = null ) : ConsoleString

Changes the foreground of this string to dark magenta, and optionally forces the background of all characters to the given color.

ToDarkRed ( this s, ConsoleColor bg = null ) : ConsoleString

Changes the foreground of this string to dark red, and optionally forces the background of all characters to the given color.

ToDarkYellow ( this s, ConsoleColor bg = null ) : ConsoleString

Changes the foreground of this string to dark yellow, and optionally forces the background of all characters to the given color.

ToGray ( this s, ConsoleColor bg = null ) : ConsoleString

Changes the foreground of this string to gray, and optionally forces the background of all characters to the given color.

ToGreen ( this s, ConsoleColor bg = null ) : ConsoleString

Changes the foreground of this string to green, and optionally forces the background of all characters to the given color.

ToMagenta ( this s, ConsoleColor bg = null ) : ConsoleString

Changes the foreground of this string to magenta, and optionally forces the background of all characters to the given color.

ToRed ( this s, ConsoleColor bg = null ) : ConsoleString

Changes the foreground of this string to red, and optionally forces the background of all characters to the given color.

ToWhite ( this s, ConsoleColor bg = null ) : ConsoleString

Changes the foreground of this string to white, and optionally forces the background of all characters to the given color.

ToYellow ( this s, ConsoleColor bg = null ) : ConsoleString

Changes the foreground of this string to yellow, and optionally forces the background of all characters to the given color.

Method Details

ToBlack() public static méthode

Changes the foreground of this string to black, and optionally forces the background of all characters to the given color.
public static ToBlack ( this s, ConsoleColor bg = null ) : ConsoleString
s this the string to use to create the result
bg ConsoleColor The new background color for all characters or null to use the console's default
Résultat ConsoleString

ToBlue() public static méthode

Changes the foreground of this string to blue, and optionally forces the background of all characters to the given color.
public static ToBlue ( this s, ConsoleColor bg = null ) : ConsoleString
s this the string to use to create the result
bg ConsoleColor The new background color for all characters or null to use the console's default
Résultat ConsoleString

ToConsoleString() public static méthode

Converts a string to a ConsoleString
public static ToConsoleString ( this s, ConsoleColor fg = null, ConsoleColor bg = null ) : ConsoleString
s this the string to convert
fg ConsoleColor the foreground color to apply to the result
bg ConsoleColor the background color to apply to the result
Résultat ConsoleString

ToCyan() public static méthode

Changes the foreground of this string to cyan, and optionally forces the background of all characters to the given color.
public static ToCyan ( this s, ConsoleColor bg = null ) : ConsoleString
s this the string to use to create the result
bg ConsoleColor The new background color for all characters or null to use the console's default
Résultat ConsoleString

ToDarkBlue() public static méthode

Changes the foreground of this string to dark blue, and optionally forces the background of all characters to the given color.
public static ToDarkBlue ( this s, ConsoleColor bg = null ) : ConsoleString
s this the string to use to create the result
bg ConsoleColor The new background color for all characters or null to use the console's default
Résultat ConsoleString

ToDarkCyan() public static méthode

Changes the foreground of this string to dark cyan, and optionally forces the background of all characters to the given color.
public static ToDarkCyan ( this s, ConsoleColor bg = null ) : ConsoleString
s this the string to use to create the result
bg ConsoleColor The new background color for all characters or null to use the console's default
Résultat ConsoleString

ToDarkGray() public static méthode

Changes the foreground of this string to dark gray, and optionally forces the background of all characters to the given color.
public static ToDarkGray ( this s, ConsoleColor bg = null ) : ConsoleString
s this the string to use to create the result
bg ConsoleColor The new background color for all characters or null to use the console's default
Résultat ConsoleString

ToDarkGreen() public static méthode

Changes the foreground of this string to dark green, and optionally forces the background of all characters to the given color.
public static ToDarkGreen ( this s, ConsoleColor bg = null ) : ConsoleString
s this the string to use to create the result
bg ConsoleColor The new background color for all characters or null to use the console's default
Résultat ConsoleString

ToDarkMagenta() public static méthode

Changes the foreground of this string to dark magenta, and optionally forces the background of all characters to the given color.
public static ToDarkMagenta ( this s, ConsoleColor bg = null ) : ConsoleString
s this the string to use to create the result
bg ConsoleColor The new background color for all characters or null to use the console's default
Résultat ConsoleString

ToDarkRed() public static méthode

Changes the foreground of this string to dark red, and optionally forces the background of all characters to the given color.
public static ToDarkRed ( this s, ConsoleColor bg = null ) : ConsoleString
s this the string to use to create the result
bg ConsoleColor The new background color for all characters or null to use the console's default
Résultat ConsoleString

ToDarkYellow() public static méthode

Changes the foreground of this string to dark yellow, and optionally forces the background of all characters to the given color.
public static ToDarkYellow ( this s, ConsoleColor bg = null ) : ConsoleString
s this the string to use to create the result
bg ConsoleColor The new background color for all characters or null to use the console's default
Résultat ConsoleString

ToGray() public static méthode

Changes the foreground of this string to gray, and optionally forces the background of all characters to the given color.
public static ToGray ( this s, ConsoleColor bg = null ) : ConsoleString
s this the string to use to create the result
bg ConsoleColor The new background color for all characters or null to use the console's default
Résultat ConsoleString

ToGreen() public static méthode

Changes the foreground of this string to green, and optionally forces the background of all characters to the given color.
public static ToGreen ( this s, ConsoleColor bg = null ) : ConsoleString
s this the string to use to create the result
bg ConsoleColor The new background color for all characters or null to use the console's default
Résultat ConsoleString

ToMagenta() public static méthode

Changes the foreground of this string to magenta, and optionally forces the background of all characters to the given color.
public static ToMagenta ( this s, ConsoleColor bg = null ) : ConsoleString
s this the string to use to create the result
bg ConsoleColor The new background color for all characters or null to use the console's default
Résultat ConsoleString

ToRed() public static méthode

Changes the foreground of this string to red, and optionally forces the background of all characters to the given color.
public static ToRed ( this s, ConsoleColor bg = null ) : ConsoleString
s this the string to use to create the result
bg ConsoleColor The new background color for all characters or null to use the console's default
Résultat ConsoleString

ToWhite() public static méthode

Changes the foreground of this string to white, and optionally forces the background of all characters to the given color.
public static ToWhite ( this s, ConsoleColor bg = null ) : ConsoleString
s this the string to use to create the result
bg ConsoleColor The new background color for all characters or null to use the console's default
Résultat ConsoleString

ToYellow() public static méthode

Changes the foreground of this string to yellow, and optionally forces the background of all characters to the given color.
public static ToYellow ( this s, ConsoleColor bg = null ) : ConsoleString
s this the string to use to create the result
bg ConsoleColor The new background color for all characters or null to use the console's default
Résultat ConsoleString