Macro colored_str::cformat
source · macro_rules! cformat { () => { ... }; ($top:tt) => { ... }; ($top:tt, $($arg:tt)*) => { ... }; }
Expand description
Creates a new String by parsing given text.
With nothing given returns an empty String.
Otherwise format given parameters using format! macro then apply colored().
Examples
Basic usage:
use colored_str::cformat;
println!("{}", cformat!("<red>this is red text</red>"));
println!("{}", cformat!("<red>this is {} text</red>", "red"));See crate for other examples