Macro styled

Source
macro_rules! styled {
    ($text:expr, $($style:tt)+) => { ... };
}
Available on crate feature utils only.
Expand description

Ideal when you want to easily style a dynamic string and terminate it and allocate a String for it at runtime. This is not a fully compiletime or no_std option as it allows for dynamic strings as text. If you want fully compile time, refer to the ansi! macro.

§Usage:

styled!("myString", br.red bold underline)

In place of the “myString” literal can be anything that implemements Display.