Expand description
ANSI escape stripping built on the byte tokenizer.
§Category
strip removes ANSI escape/string/control sequences while preserving
printable text and non-ESC control bytes such as newlines and tabs.
§Parser conventions
Tokenization recognizes CSI, OSC, DCS, SOS, PM, APC, and two-byte ESC sequences in both 7-bit and 8-bit forms. Escape tokens contribute no output.
§Mode interaction
Stripping does not emulate terminal modes. It is a byte-stream transformation suitable for display-width and plain-text extraction paths.
Functions§
- strip
- Return
swith ANSI escape sequences removed.