pub fn strip_str<T>(data: T) -> Stringwhere
    T: AsRef<str>,
Expand description

Strip ANSI escapes from data and return the remaining contents as a String.

Example

let str_with_colors = "\x1b[32mfoo\x1b[m bar";
let string_without_colors = strip_ansi_escapes::strip_str(str_with_colors);
assert_eq!(string_without_colors, "foo bar");