Macro colored_str::colored
source · macro_rules! colored { () => { ... }; ($top:tt) => { ... }; ($top:tt, $($arg:tt)*) => { ... }; }
Expand description
Print colored text to standard output.
With nothing given does nothing.
Otherwise format given parameters using format! macro, apply colored(), then print! to standard output.
Examples
Basic usage:
use colored_str::colored;
colored!("<red>this is red text</red>");
colored!("<red>this is {} text</red>", "red");See crate for other examples