Macro stilo::println_styles

source ·
macro_rules! println_styles {
    ( $( $arg: tt )* ) => { ... };
}
Expand description

Print many stylized strings individually, concatenated, with newline.

Similar: stylize_many!

For each argument, creates a Style struct and format text.

Separate arguments with a semicolon. New lines will not be added between arguments.

Each argument is used the same as the stylize! macro.

Examples

let world = "World!";

// `println_styles!` would also work in this example
println_styles!(
    // Red
    "Hello\n": Red;
    // Red, italic, and bold
    "Hello\n": Red italic bold;
    // Default color, italic and bold
    "Hello\n": - i b;
    // Format string
    "Hello {}": Green i b, world;
);