Function design_pattern_examples_rust::helpers::titlecase::titlecase
source · pub fn titlecase(s: &str) -> String
Expand description
Convert the first word (or only word) in the given string to lowercase then make the first letter uppercase. It does not touch any of the other words after the first.
Parameters
-
s
A string to work on.
Returns
Returns a new string containing the modified string.