axum-test 20.0.0

Easy E2E testing for Axum
Documentation
1
2
3
4
5
6
7
8
9
use regex::Regex;

pub fn strip_ansi_codes<S>(s: S) -> String
where
    S: AsRef<str>,
{
    let re = Regex::new(r"\x1b\[[0-9;]*m").unwrap();
    re.replace_all(s.as_ref(), "").to_string()
}