{"id":15031709,"url":"https://github.com/jumperbot/split-every","last_synced_at":"2026-02-11T00:31:01.866Z","repository":{"id":252019464,"uuid":"839142896","full_name":"JumperBot/split-every","owner":"JumperBot","description":"Split for every n occurrences of a pattern iteratively!","archived":false,"fork":false,"pushed_at":"2024-12-21T13:43:29.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-17T03:39:46.785Z","etag":null,"topics":["rust","rust-crate","rust-lang","rust-language","rust-library","split","splitter","splitting","splitting-text","string","string-formatting","string-manipulation","text"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/split-every","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JumperBot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-07T03:58:54.000Z","updated_at":"2024-12-21T13:39:43.000Z","dependencies_parsed_at":"2024-08-07T07:58:07.086Z","dependency_job_id":"dd01be17-28c8-4767-99c8-53795aabf1ef","html_url":"https://github.com/JumperBot/split-every","commit_stats":null,"previous_names":["jumperbot/split-every"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/JumperBot/split-every","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JumperBot%2Fsplit-every","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JumperBot%2Fsplit-every/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JumperBot%2Fsplit-every/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JumperBot%2Fsplit-every/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JumperBot","download_url":"https://codeload.github.com/JumperBot/split-every/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JumperBot%2Fsplit-every/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271749063,"owners_count":24814116,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["rust","rust-crate","rust-lang","rust-language","rust-library","split","splitter","splitting","splitting-text","string","string-formatting","string-manipulation","text"],"created_at":"2024-09-24T20:16:22.604Z","updated_at":"2026-02-11T00:31:01.560Z","avatar_url":"https://github.com/JumperBot.png","language":"Rust","readme":"\u003cdiv align=\"center\"\u003e\n\n# split-every\n\n![crates.io version](https://img.shields.io/crates/v/split-every.svg?label=release)\n![github.com forks](https://img.shields.io/github/forks/JumperBot/split-every)\n![github.com stars](https://img.shields.io/github/stars/JumperBot/split-every)\n![crates.io downloads](https://img.shields.io/crates/d/split-every.svg?label=downloads)\n\n\u003c/div\u003e\n\n---\n\n```rust\nuse split_every::prelude::*;\n\n// This prints: [(0, 0), (0, 1)]\n//              [(0, 0)]\n//              [(0, 1), (0, 0)]\n//              [(0, 1)]\nlet mut splitter: SplitEvery\u003c\u0026[(u8, u8)], \u0026[(u8, u8)]\u003e = [\n    (0, 0), (0, 1), (0, 0),\n    (0, 0), (0, 0), (0, 1),\n    (0, 0), (0, 0), (0, 1),\n].split_every_n_times(\u0026[(0, 0)], 2);\nprintln!(\"{:?}\", splitter.next().unwrap());\nprintln!(\"{:?}\", splitter.next().unwrap());\nprintln!(\"{:?}\", splitter.next().unwrap());\nprintln!(\"{:?}\", splitter.next().unwrap());\n\n// This prints: \"Oh hi there\"\n//              \"I don't really\"\n//              \"know what to\"\n//              \"say\".\nlet mut splitter: SplitEvery\u003c\u0026str, \u0026str\u003e =\n    \"Oh hi there I don't really know what to say\".split_every_n_times(\" \", 3);\nprintln!(\"{:?}\", splitter.next().unwrap());\nprintln!(\"{:?}\", splitter.next().unwrap());\nprintln!(\"{:?}\", splitter.next().unwrap());\nprintln!(\"{:?}\", splitter.next().unwrap());\n\n// This prints: [\"This\", \"is\", \"you\", \"This\"]\n//              [\"me\", \"This\", \"is\", \"someone\", \"This\"]\n//              [\"them\"]\nlet mut splitter: SplitEvery\u003cBox\u003cdyn FnMut() -\u003e Option\u003c\u0026'static str\u003e\u003e, \u0026str\u003e = [\n    [\"This\", \"is\", \"you\"],\n    [\"This\", \"is\", \"me\"],\n    [\"This\", \"is\", \"someone\"],\n    [\"This\", \"is\", \"them\"],\n]\n.iter()\n.flatten()\n.copied()\n.split_every_n_times(\"is\", 2);\nprintln!(\"{:?}\", splitter.next().unwrap());\nprintln!(\"{:?}\", splitter.next().unwrap());\nprintln!(\"{:?}\", splitter.next().unwrap());\n\n// This prints: [\"This\", \"is\", \"you\", \"This\"]\n//              [\"me\", \"This\", \"is\", \"someone\", \"This\"]\n//              [\"them\"]\nlet mut iter = [\n    [\"This\", \"is\", \"you\"],\n    [\"This\", \"is\", \"me\"],\n    [\"This\", \"is\", \"someone\"],\n    [\"This\", \"is\", \"them\"],\n].iter().flatten().map(|val| *val);\nlet mut splitter: SplitEvery\u003cBox\u003cdyn FnMut() -\u003e Option\u003c\u0026'static str\u003e\u003e, \u0026str\u003e =\n    SplitEvery::n_times_from_fn(Box::new(move || iter.next()), \"is\", 2);\nprintln!(\"{:?}\", splitter.next().unwrap());\nprintln!(\"{:?}\", splitter.next().unwrap());\nprintln!(\"{:?}\", splitter.next().unwrap());\n```\n\n---\n\n## ✨ Split For Every N Occurrences Of A Pattern Iteratively\n\nThis crate **helps you** split data for every `n` occurrences of a `pattern`.  \nIt contains an exclusive `iterator`.\n\n---\n\n## 📄 Licensing\n\n`split-every` is licensed under the [`MIT LICENSE`](./LICENSE); This is the [`summarization`](https://choosealicense.com/licenses/mit/).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjumperbot%2Fsplit-every","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjumperbot%2Fsplit-every","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjumperbot%2Fsplit-every/lists"}