RosettaCodeData/Task/Reverse-a-string/Rust/reverse-a-string-2.rust

3 lines
133 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
let output: String = "一二三四五六七八九十".chars().rev().collect();
assert_eq!(output, "十九八七六五四三二一");