Expand description
§Splitter
§A string and slice splitter library
§String Example
use splitter::StrSplitter;
let sp = StrSplitter::new("bytes example", " ");
assert_eq!(
sp.collect::<Vec<_>>(),
vec!["bytes", " ", "example"],
);
§Slice Example
use splitter::Splitter;
let sp = Splitter::new(&[1, 2, 3, 3, 4], [[2], [4]]);
let re: Vec<&[usize]> = vec![&[1], &[2], &[3, 3], &[4]];
assert_eq!(sp.collect::<Vec<_>>(), re);
§Look at the examples for more info
§Features
Re-exports§
pub use crate::info::Info;
Modules§
Structs§
- Splitter
- The base splitter over any type of slice
- StrSplitter
- The string splitter
Traits§
- StrInfo
- The trait for the elements yielded by the
crate::StrSplitter