Function stringcase::cobol_case_with_nums_as_word
source ยท pub fn cobol_case_with_nums_as_word(input: &str) -> String
Expand description
Converts a string to cobol case.
This function takes a string slice as its argument, then returns a String
of which the case style is cobol case.
This function targets the upper and lower cases of ASCII alphabets and ASCII numbers for capitalization, and all characters except ASCII alphabets and ASCII numbers are replaced to hyphens as word separators.
let cobol = stringcase::cobol_case_with_nums_as_word("fooBar123Baz");
assert_eq!(cobol, "FOO-BAR-123-BAZ");