Function uppercase

Source
pub fn uppercase<S: Display>(source: S) -> Result<Upper<S>, Infallible>
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>"
);