Header menu logo B2R2

ColoredString Type

Represent a string that can be printed out in the console with colors. A colored string is a list of colored segments, each of which represents a string with a specific color.

Constructors

Constructor Description

ColoredString(bs)

Full Usage: ColoredString(bs)

Parameters:
    bs : byte[]

Returns: ColoredString

Constructs a colored string from a byte array.

bs : byte[]
Returns: ColoredString

ColoredString(col, str)

Full Usage: ColoredString(col, str)

Parameters:
    col : Color
    str : string

Returns: ColoredString

Constructs a colored string from given a tuple of a color and a string.

col : Color
str : string
Returns: ColoredString

ColoredString()

Full Usage: ColoredString()

Returns: ColoredString
Returns: ColoredString

Instance members

Instance member Description

this.Add

Full Usage: this.Add

Parameters:
    col : Color
    str : string

Returns: ColoredString

Adds a colored segment to the string.

col : Color
str : string
Returns: ColoredString

this.Length

Full Usage: this.Length

Returns: int

Returns the length of the colored string.

Returns: int

this.PadLeft

Full Usage: this.PadLeft

Parameters:
    width : int

Returns: ColoredString

Adds a padded string to the colored string. The string is padded with spaces to the right if it is shorter than the given width.

width : int
Returns: ColoredString

this.PadRight

Full Usage: this.PadRight

Parameters:
    width : int

Returns: ColoredString

Adds a padded string to the colored string. The string is padded with spaces to the left if it is shorter than the given width.

width : int
Returns: ColoredString

this.Render

Full Usage: this.Render

Parameters:
    fn : Color -> string -> unit

Renders the colored string by applying the given function to each colored segment.

fn : Color -> string -> unit

Type something to start searching.