Function inflections::case::to_upper_case
[−]
[src]
pub fn to_upper_case(string: &str) -> String
Converts any case into UPPER CASE ignoring seperators.
Example
let upper = "HELLO WORLD".to_owned(); assert_eq!(to_upper_case("hello world"), upper); assert_eq!(to_upper_case("HELLO WORLD"), upper); assert_eq!(to_upper_case("Hello World"), upper); assert_eq!(to_upper_case("helloWorld"), "HELLOWORLD".to_owned()); assert_eq!(to_upper_case("HelloWorld"), "HELLOWORLD".to_owned()); assert_eq!(to_upper_case("hello-world"), "HELLO-WORLD".to_owned()); assert_eq!(to_upper_case("Hello-World"), "HELLO-WORLD".to_owned()); assert_eq!(to_upper_case("hello_world"), "HELLO_WORLD".to_owned()); assert_eq!(to_upper_case("HELLO_WORLD"), "HELLO_WORLD".to_owned());