Macro color_print::cstr

source ·
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");