The input to strip.
An InputRange that provides all ranges of characters from input that do not belong to an ANSI command sequence.
import std.array : array; auto ansiText = "ABC".ansi.fg(Ansi4BitColour.red).toString() ~ "Doe Ray Me".ansi.bg(Ansi4BitColour.green).toString() ~ "123"; assert(ansiText.stripAnsi.array == ["ABC", "Doe Ray Me", "123"]);
asAnsiSections
Provides an InputRange that iterates over all non-ANSI related parts of input.
This can effectively be used to parse over text that is/might contain ANSI encoded text.