pub fn colored(text: &str) -> ColoredStringExpand description
Creates a new ColoredString by parsing given text.
It will parse the given text, searching for <...> * </> blocks and <+...> * <->
subblocks, to add corresponding styles to the text. It then returns a new
instance of ColoredString.
ยงExamples
Basic usage:
use colored_str::colored;
println!("{}", colored("<red>this is red text</red>"));See crate for other examples