Function titlecase

Source
pub fn titlecase<S: Display>(source: S) -> Result<Title<S>, Infallible>
Expand description

Return a title cased version of the value. Alias for the |title filter.

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

assert_eq!(
    Example { example: "hello WORLD" }.to_string(),
    "<div>Hello World</div>"
);