Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUST

Split text on several separators

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);
}
 
PREVIOUS NEXT
Tagged: #Split #text #separators
ADD COMMENT
Topic
Name
3+2 =