Skip to main content

strip_ansi

Function strip_ansi 

Source
pub(super) fn strip_ansi(s: &str) -> String
Expand description

Terminal output as plain text: escape sequences (CSI, OSC, DCS, two-byte escapes) removed, a cursor move to another row read as a line break, CRLF as LF, a lone CR starting its line over (a progress bar reads as its last state), backspace applied, other control characters dropped.