Skip to main content

format_with

Function format_with 

Source
pub fn format_with(
    template: &str,
    value: impl FnMut(usize, &mut String) -> bool,
) -> String
Expand description

A template with each {0}, {1}… written by value, straight into what it gives, so nothing else is made for each value. value says false for a number it has nothing for, which then stays as it was.