Skip to content

JumperBot/split-every

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

split-every

crates.io version github.com forks github.com stars crates.io downloads


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());

✨ Split For Every N Occurrences Of A Pattern Iteratively

This crate helps you split a string for every n occurrences of a pattern.
It contains an exclusive iterator.


📄 Licensing

split-every is licensed under the MIT LICENSE; This is the summarization.