Latest Version

split_by

Split anything implementing Read trait by multiple sequences of bytes

Documentation

Quick start

Add this to Cargo.toml, under [dependencies]:

toml split_by = "0.1"

Usage

```rust extern crate splitby; use splitby::{AcAutomaton, SplitBy} use std::fs::File;

fn main() { let ac = AcAutomaton::new(vec![""]); for section in File::open("path/to/file").unwrap().split_by(&ac) { // do something with the bytes found bytes between patterns } } ```