format_filter

Function format_filter 

Source
pub fn format_filter(
    style: FormatStyle,
    format_str: &str,
    args: &[Value],
) -> Result<String, Error>
Expand description

A helper function to apply a set of values to a given format string.

The function supports two styles of formatting as described by the FormatStyle enum. It is used to implement the format builtin filter, compatible with jinja2, and to implement the str.format() function in Python compatibility support in minijinja-contrib.