📜  rustlang char 数组 - Rust 代码示例

📅  最后修改于: 2022-03-11 14:49:25.529000             🧑  作者: Mango

代码示例2
let a = String::from("hello");
let chars: Vec<_> = a.chars().collect();
for (i,ch) in a.chars().enumerate() {
  println!("{} {}", i, ch);
}