Module inflections::case [−][src]
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
Check to see if a string is camelCase.
Check to see if a string is CONSTANT_CASE.
Check to see if a string is kebab-case.
Check to see if a string is completely lower case.
Check to see if a string is PascalCase.
Check to see if a string is sentence case.
Check to see if a string is snake_case.
Check to see if a string is Title Case.
Check to see if a string is Train-Case.
Check to see if a string is completely UPPER CASE.
Converts any case into camelCase.
Converts any case into CONSTANT_CASE.
Converts any case into kebab-case.
Converts any case into lower case ignoring separators.
Converts any case into PascalCase.
Converts any case into traditional sentence case without capitalizing the first letter.
Converts any case into snake_case.
Converts any case into title case where every word is capitalized.
Converts any case into Train-Case.
Converts any case into UPPER CASE ignoring separators.