Function inflections::case::to_title_case [−][src]
Expand description
Converts any case into title case where every word is capitalized.
Example
let title = "Hello World".to_owned();
assert_eq!(to_title_case("hello world"), title);
assert_eq!(to_title_case("HELLO WORLD"), title);
assert_eq!(to_title_case("Hello World"), title);
assert_eq!(to_title_case("helloWorld"), title);
assert_eq!(to_title_case("HelloWorld"), title);
assert_eq!(to_title_case("hello-world"), title);
assert_eq!(to_title_case("Hello-World"), title);
assert_eq!(to_title_case("hello_world"), title);
assert_eq!(to_title_case("HELLO_WORLD"), title);