- to_lowercase
- to_uppercase
To lower, to upper case
examples/strings/to-lower-to-upper/src/main.rs
fn main() { let text = String::from("The Green cat"); println!("{}", text); println!("{}", text.to_lowercase()); println!("{}", text.to_uppercase()); }
The Green cat the green cat THE GREEN CAT