cstr!() { /* proc-macro */ }
Expand description
Colorizes a string literal, without formatting the format!
-like placeholders.
- Accepts only one argument;
- Will panic if feature
terminfo
is activated.
ยงExample
let s: &str = cstr!("A <g>green</> word");
assert_eq!(s, "A \u{1b}[32mgreen\u{1b}[39m word");