Function strip_bytes
pub fn strip_bytes(data: &[u8]) -> StrippedBytes<'_>
Strip ANSI escapes from bytes, 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.
Example
use Write as _;
let styled_text = "\x1b[32mfoo\x1b[m bar";
let plain_str = strip_bytes.into_vec;
assert_eq!;