ansi

A helper UFCS function used to fluently convert any piece of text into an AnsiText.

@safe @nogc nothrow pure
ansi
(
const char[] text
)

Examples

assert("Hello".ansi.toString() == "Hello");
assert("Hello".ansi.fg(Ansi4BitColour.black).toString() == "\033[30mHello\033[0m");
assert("Hello".ansi.bold.strike.bold(false).italic.toString() == "\033[3;9mHello\033[0m");

Meta