split_exact

Crates.iosplit_exact
lib.rssplit_exact
version1.1.0
sourcesrc
created_at2024-03-15 01:14:49.266968
updated_at2024-04-11 17:16:39.676353
descriptionsplitting strings into arrays of slices
homepage
repositoryhttps://codeberg.org/voidentente/split_exact
max_upload_size
id1174296
size4,542
__________ (voidentente)

documentation

README

split_exact

Implements splitting at patterns into exactly N destructurable slices.

Until Pattern API is stabilized, this crate currently only supports single character separators.

Usage

let header = "GET / HTTP/1.1";
let [method, path, http] = header.split_exact(char::is_whitespace);

Also with variant that returns remainder slice.

License

MIT OR Apache-2.0

Commit count: 0

cargo fmt