Skip to main content

strip_ansi

Function strip_ansi 

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

Strip ANSI escape codes from text, keeping only plain text.

Delegates to anstream’s ANSI state machine. An incomplete sequence at the end of the input is dropped rather than emitted as raw control bytes; for chunked input use AnsiStripStream so a split sequence is not lost.