Skip to main content

humanize_string

Function humanize_string 

Source
pub fn humanize_string(string: &str) -> String
Expand description

Make string human-readable: split camelCase, replace _/- with spaces, collapse whitespace, and capitalize the first letter.

Equivalent to humanize_string_with(string, false).

assert_eq!(humanize_string("innerHTML"), "Inner html");