{"id":28253867,"url":"https://github.com/rustynova016/i_splits","last_synced_at":"2025-10-06T12:14:16.391Z","repository":{"id":277545529,"uuid":"932691878","full_name":"RustyNova016/i_splits","owner":"RustyNova016","description":"More ways to split your strs!","archived":false,"fork":false,"pushed_at":"2025-02-14T13:45:41.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-16T03:32:21.611Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RustyNova016.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":"2025-02-14T10:45:39.000Z","updated_at":"2025-02-14T13:47:31.000Z","dependencies_parsed_at":"2025-02-14T14:47:04.836Z","dependency_job_id":null,"html_url":"https://github.com/RustyNova016/i_splits","commit_stats":null,"previous_names":["rustynova016/i_splits"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RustyNova016/i_splits","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RustyNova016%2Fi_splits","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RustyNova016%2Fi_splits/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RustyNova016%2Fi_splits/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RustyNova016%2Fi_splits/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RustyNova016","download_url":"https://codeload.github.com/RustyNova016/i_splits/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RustyNova016%2Fi_splits/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278607494,"owners_count":26014814,"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-10-06T02:00:05.630Z","response_time":65,"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":[],"created_at":"2025-05-19T17:22:42.549Z","updated_at":"2025-10-06T12:14:16.386Z","avatar_url":"https://github.com/RustyNova016.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# i_splits\n\nThis crate add two string splitting methods:\n- `split_i`: Split the string in half at the occurence `i` of a pattern.\n- `split_once_last`: Split the string in half at the last occurence of a pattern.\n\n\nThis crate use no dependencies and no unsafe code. This comes at a compromise of having to return `String`s instead of `\u0026str`s, as well as only being able to pass `\u0026str`s as patterns. \nThis is due to the fact that the `Pattern` trait isn't stable yet in std. \n\n## Example\n```rust\nuse i_splits::ISplitExt as _;\n\n// split_i\n\nlet v = \"To show you the power of i_split, I cut that sentence in half!\".split_i(\", \", 1);\nassert_eq!(v, Some((\"To show you the power of i_split\".to_string(), \"I cut that sentence in half!\".to_string())));\n\nlet v = \"cookie|lolipop|muffin|pancake\".split_i(\"|\", 2);\nassert_eq!(v, Some((\"cookie|lolipop\".to_string(), \"muffin|pancake\".to_string())));\n\nlet v = \"No splits? That's a `None` for you\".split_i(\"!\", 2);\nassert_eq!(v, None);\n\nlet v = \"Don't go too far either!\".split_i(\" \", 10);\nassert_eq!(v, None);\n\n// split_once_last\n\nlet v = \"To show you the power of i_split, I cut that sentence in half!\".split_once_last(\", \");\nassert_eq!(v, Some((\"To show you the power of i_split\".to_string(), \"I cut that sentence in half!\".to_string())));\n\nlet v = \"cookie|lolipop|muffin|pancake\".split_once_last(\"|\");\nassert_eq!(v, Some((\"cookie|lolipop|muffin\".to_string(), \"pancake\".to_string())));\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frustynova016%2Fi_splits","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frustynova016%2Fi_splits","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frustynova016%2Fi_splits/lists"}