ansi

Creates an AnsiTextLite from the given text. This function is mostly used when using the fluent UFCS chaining pattern.

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

Parameters

text const(char)[]

The text to use.

Return Value

An AnsiTextLite from the given text.

Examples

version(none)
{
    import std.stdio;
    writeln("Hello, World!".ansi
                           .fg(Ansi4BitColour.red)
                           .bg(AnsiRgbColour(128, 128, 128))
                           .style(AnsiStyle.init.bold.underline)
    );
}

Meta