// This is free and unencumbered software released into the public domain.
/// Strips the ANSI CSI escape sequences emitted by `color_print`.
pubfnstrip_ansi(input: impl AsRef<str>)-> String{let input = input.as_ref();if!input.contains('\x1b'){return input.to_string();}letmut output =String::with_capacity(input.len());letmut chars = input.chars();whileletSome(c)= chars.next(){if c =='\x1b'{if chars.next()==Some('['){for c in chars.by_ref(){if('@'..='~').contains(&c){break;}}}}else{
output.push(c);}}
output
}