C# Класс PowerArgs.StringEx

string extension methods
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Описание методов

ToBlack() публичный статический Метод

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
Результат ConsoleString

ToBlue() публичный статический Метод

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
Результат ConsoleString

ToConsoleString() публичный статический Метод

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
Результат ConsoleString

ToCyan() публичный статический Метод

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
Результат ConsoleString

ToDarkBlue() публичный статический Метод

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
Результат ConsoleString

ToDarkCyan() публичный статический Метод

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
Результат ConsoleString

ToDarkGray() публичный статический Метод

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
Результат ConsoleString

ToDarkGreen() публичный статический Метод

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
Результат ConsoleString

ToDarkMagenta() публичный статический Метод

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
Результат ConsoleString

ToDarkRed() публичный статический Метод

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
Результат ConsoleString

ToDarkYellow() публичный статический Метод

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
Результат ConsoleString

ToGray() публичный статический Метод

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
Результат ConsoleString

ToGreen() публичный статический Метод

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
Результат ConsoleString

ToMagenta() публичный статический Метод

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
Результат ConsoleString

ToRed() публичный статический Метод

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
Результат ConsoleString

ToWhite() публичный статический Метод

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
Результат ConsoleString

ToYellow() публичный статический Метод

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
Результат ConsoleString