Exerpad
🔥 0
0 XP
Exercise 10 · Chapter: StringsOptional+50 XP

Reverse String

Take the string "Rust" and print it reversed.

Expected output:

tsuR

Hints:

  • Use .chars() to get the characters
  • Use .rev() to reverse them
  • Use .collect::<String>() to turn them back into a String
rust
fn main() {
}
Output
Run your code to see the output here.