Function lowercase

Source
pub fn lowercase(s: impl Display) -> Result<String, Error>
Expand description

Converts to lowercase, alias for the |lower filter

/// ```jinja
/// <div>{{ word|lowercase }}</div>
/// ```
#[derive(Template)]
#[template(ext = "html", in_doc = true)]
struct Example<'a> {
    word: &'a str,
}

assert_eq!(
    Example { word: "FOO" }.to_string(),
    "<div>foo</div>"
);

assert_eq!(
    Example { word: "FooBar" }.to_string(),
    "<div>foobar</div>"
);