Contact: aviboots(AT)netvision.net.il
39,955 questions
51,897 answers
573 users
fn reverse_string(s: &str) -> String { s.chars().rev().collect() } fn main() { let string = String::from("rust c c++ c#"); let reversed = reverse_string(&string); println!("{}", reversed); } /* run: #c ++c c tsur */
fn main() { let s = "rust"; let revs = s.chars().rev().collect::<String>(); println!("{}", revs); } /* run: tsur */