pub fn strip_ansi(s: &str) -> Cow<'_, str>
Removes ANSI escape sequences from s.
s
Borrows when there is nothing to remove.
use shellgame::ui::text::strip_ansi; assert_eq!(strip_ansi("\x1b[1;36mahoj\x1b[0m"), "ahoj");