cformat

Macro 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