Exerpad
🔥0
0 XP
Lv.1 Beginner
Log In

Reverse String

Take the string "Rust" and print it reversed.

Expected output:

text
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() {
}