📅  最后修改于: 2022-03-11 14:49:25.529000             🧑  作者: Mango
let a = String::from("hello");
let chars: Vec<_> = a.chars().collect();
for (i,ch) in a.chars().enumerate() {
println!("{} {}", i, ch);
}