| Crates.io | split_exact |
| lib.rs | split_exact |
| version | 1.1.0 |
| created_at | 2024-03-15 01:14:49.266968+00 |
| updated_at | 2024-04-11 17:16:39.676353+00 |
| description | splitting strings into arrays of slices |
| homepage | |
| repository | https://codeberg.org/voidentente/split_exact |
| max_upload_size | |
| id | 1174296 |
| size | 4,542 |
Implements splitting at patterns into exactly N destructurable slices.
Until Pattern API is stabilized, this crate currently only supports
single character separators.
let header = "GET / HTTP/1.1";
let [method, path, http] = header.split_exact(char::is_whitespace);
Also with variant that returns remainder slice.
MIT OR Apache-2.0