Core Beginner
04 Strings & slices
Two string types: String owns its text, &str borrows a view of it. Slice out the first word, then build a fresh String from a borrowed one.
Build an owned String in shout: uppercase the input and add "!".
Hints
to_uppercase()on a&stralready allocates a newString.format!("{}!", ...)glues on the bang.
Reveal solution
fn shout(s: &str) -> String {
format!("{}!", s.to_uppercase())
}