use split_every::{SplitEveryImpl, SplitEvery};
// This prints: "Oh hi there"
// "I don't really"
// "know what to"
// "say".
let mut splitter: SplitEvery<&str> =
"Oh hi there I don't really know what to say".split_every_n_times(" ", 3);
println!("{}", splitter.next().unwrap());
println!("{}", splitter.next().unwrap());
println!("{}", splitter.next().unwrap());
println!("{}", splitter.next().unwrap());
This crate helps you split a string
for every n
occurrences of a pattern
.
It contains an exclusive iterator
.
split-every
is licensed under the MIT LICENSE
; This is the summarization
.