Function coded_chars::presentation::format_str
source · pub fn format_str(str: &str, format: &GraphicSelection) -> StringExpand description
Format a string with the specified SGR sequence.
The string is terminated with the sequence \x1b[0m to reset the style.
§Example
use coded_chars::presentation::{format_str, select_graphic};
let formatted = format_str(
"World",
select_graphic().fg_red().bold().underline()
);
println!("Hello {} !", formatted);