Module inflections::case

source ·
Expand description

Utilities to change the case of a string to another case. Supports “lower case,” “UPPER CASE,” “sentence case,” “Title Case,” “camelCase,” “PascalCase,” “kebab-case,” “Train-Case,” “snake_case,” and “CONSTANT_CASE.”

For more information Wikipedia has an interesting article on these special case styles.

§Example

use inflections::case::to_camel_case;

assert_eq!(to_camel_case("Hello World"), "helloWorld".to_owned());

Functions§