Skip to main content

title

Function title 

Source
pub fn title(v: Cow<'_, str>) -> String
Expand description

Converts a value to title case.

Words are started by whitespace or one of -, (, {, [ and <. Other punctuation such as ', . or _ does not start a new word, so don't becomes Don't rather than Don'T. The first character of every word is uppercased, the rest is lowercased.

<h1>{{ chapter.title|title }}</h1>