I am trying to extract tailing number from string.
My current implement seems not good, as there are dual collect::<String>.
fn main() {
let x = "11 DDD12";
let y = x
.chars()
.rev()
.take_while(char::is_ascii_digit)
.collect::<String>();
let y: i32 = y.chars().rev().collect::<String>().parse().unwrap();
println!("{:?}", y);
}