Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jumperbot/split-every
Split for every n occurrences of a pattern iteratively!
https://github.com/jumperbot/split-every
rust rust-crate rust-lang rust-language rust-library split splitter splitting splitting-text string string-formatting string-manipulation text
Last synced: 2 months ago
JSON representation
Split for every n occurrences of a pattern iteratively!
- Host: GitHub
- URL: https://github.com/jumperbot/split-every
- Owner: JumperBot
- License: mit
- Created: 2024-08-07T03:58:54.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2024-08-09T13:17:28.000Z (5 months ago)
- Last Synced: 2024-10-12T13:21:57.142Z (2 months ago)
- Topics: rust, rust-crate, rust-lang, rust-language, rust-library, split, splitter, splitting, splitting-text, string, string-formatting, string-manipulation, text
- Language: Rust
- Homepage: https://crates.io/crates/split-every
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# split-every
![crates.io version](https://img.shields.io/crates/v/split-every.svg?label=release)
![github.com forks](https://img.shields.io/github/forks/JumperBot/split-every)
![github.com stars](https://img.shields.io/github/stars/JumperBot/split-every)
![crates.io downloads](https://img.shields.io/crates/d/split-every.svg?label=downloads)---
```rust
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`](./LICENSE); This is the [`summarization`](https://choosealicense.com/licenses/mit/).