AnsiStyle

Contains any number of styling options from AnsiStyleSgr, and provides the ability to generate an ANSI SGR command to apply all of the selected styling options.

Members

Functions

bold
AnsiStyle bold(bool enable)
bold
bool bold()
dim
AnsiStyle dim(bool enable)
dim
bool dim()
fastBlink
AnsiStyle fastBlink(bool enable)
fastBlink
bool fastBlink()
get
bool get(AnsiSgrStyle style)

Get the status of a certain styling option.

invert
AnsiStyle invert(bool enable)
invert
bool invert()
italic
AnsiStyle italic(bool enable)
italic
bool italic()
reset
AnsiStyle reset()

Removes all styling from this AnsiStyle.

set
AnsiStyle set(AnsiSgrStyle style, bool enable)

Enables/Disables a certain styling option.

slowBlink
AnsiStyle slowBlink(bool enable)
slowBlink
bool slowBlink()
strike
AnsiStyle strike(bool enable)
strike
bool strike()
toSequence
char[] toSequence(char[MAX_CHARS_NEEDED] buffer)

Creates an ANSI SGR command that enables all of the desired styling options, while leaving all of the other options unchanged.

toString
string toString()

[Not enabled in -betterC] Converts this AnsiStyle into a GC-allocated sequence string.

underline
AnsiStyle underline(bool enable)
underline
bool underline()

Manifest constants

MAX_CHARS_NEEDED
enum MAX_CHARS_NEEDED;

The maximum amount of characters any singular AnsiStyle sequence may use.

Meta