The statically allocated buffer used to store the result of this function.
A slice into buffer that contains the output of this function.
static if(!BetterC) { char[AnsiStyle.MAX_CHARS_NEEDED] buffer; void test(string expected, AnsiStyle style) { const slice = style.toSequence(buffer); assert(slice == expected, "Got '"~slice~"' wanted '"~expected~"'"); } test("", AnsiStyle.init); test("1;2;3", AnsiStyle.init.bold.dim.italic); }
Creates an ANSI SGR command that enables all of the desired styling options, while leaving all of the other options unchanged.
Please note that the CSI (ANSI_CSI/\033[) and the SGR marker (ANSI_COLOUR_END/m) are not included in this output.
Notes: Any characters inside of buffer that are not covered by the returned slice, are left unmodified.
If this colour hasn't been initialised or assigned a value, then the returned value is simply null.