📜  在多个分隔符上拆分文本 - Rust 代码示例

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

代码示例1
fn main() {
  let s = "Hey, is this a complex-program, or a complex_program";
  let chunks:Vec<_> = s.split(&[',', '-', '_'][..]).collect();

  println!("Split on multiple separators = {:?} ", chunks);
}