Skip to main content

write_if_else

Function write_if_else 

Source
pub(crate) fn write_if_else(
    output: &mut (impl Write + ?Sized),
    pred: bool,
    true_str: &str,
    false_str: &str,
) -> Result<usize>
Available on crate feature formatting only.
Expand description

If pred is true, write true_str to the output. Otherwise, write false_str.