📜  在空格上分割一行 - Rust 代码示例

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

代码示例1
fn main() {
  let s = "line 1
  line 2
  line 3";
  let chunks:Vec<_> = s.split_whitespace().collect();

  println!("Sum of x and y = {:?} ", chunks);
}