Function strip_str
pub fn strip_str(data: &str) -> StrippedStr<'_>
Strip ANSI escapes from a &str, returning the printable content
This can be used to take output from a program that includes escape sequences and write it somewhere that does not easily support them, such as a log file.
For non-contiguous data, see StripStr.
Example
use Write as _;
let styled_text = "\x1b[32mfoo\x1b[m bar";
let plain_str = strip_str.to_string;
assert_eq!;