I've been looking into how you convert a string to upper case in Rust. The most optimal way I've figured out so far is this:
let s = "smash";
let asc = s.to_ascii().to_upper();
println!("Hulk {:s}", asc.as_str_ascii());
Is there a less verbose way to do it?
Note: This question is specifically targetted at Rust 0.9. There was another related answer available at the time of asking, but it was for Rust 0.8 which has significant syntax differences and so not applicable.