Registry / utility / slice-group-by

slice-group-by

JSON →
library0.3.1rscratesunverified

Provides iterators over groups of consecutive equal elements in slices and strs.

# Cargo.toml [dependencies] slice-group-by = "0.3.1"
INSTALL
IMPORT
SIG · SLICE-GROUP-BY
S
slice-group-by
utilityrustv0.3.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

GroupBy
use slice_group_by::GroupBy;

Group consecutive equal elements in a slice.

use slice_group_by::GroupBy; fn main() { let data = [1, 1, 2, 3, 3]; for group in data.group_by(|a, b| a == b) { println!("{:?}", group); } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.3.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Resources
slice-group-by — cargo add slice-group-by · libregistry