📅  最后修改于: 2022-03-11 15:00:35.833000             🧑  作者: Mango
// 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