Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUST

rust split string into words

// if s is your String or string slice, you can split it

s.split("separator")  // by separator
s.split_whitespace()  // by whitespace
s.lines()  // by newlines
Regex::new(r"s").unwrap().split("one two three")  // by regex crate
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #rust #split #string #words
ADD COMMENT
Topic
Name
5+7 =