Function uppercase

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

Converts to uppercase, alias for the |upper filter

/// ```jinja
/// <div>{{ word|uppercase }}</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>"
);