Skip to main content

formatmc

Macro formatmc 

Source
macro_rules! formatmc {
    ($cond:expr, $l:literal $(,)?) => { ... };
    ($cond:expr, $l:literal, $($e:expr),+ $(,)?) => { ... };
}
Expand description

Works as format!, conditionally skips terminal commands in "{'...}".

ยงExamples

use termal::*;
// Generate 'hello' (not in yellow, the terminal commands are skipped):
printmcln!(false, "{'yellow}hello{'reset}");