Registry Mirror
Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Latest Version

split_by

Split anything implementing Read trait by multiple sequences of bytes

Documentation

Quick start

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

split_by = "0.2"

Usage

extern crate split_by;
use split_by::{AcAutomaton, SplitBy}
use std::fs::File;

fn main() {
    for section in File::open("path/to/file").unwrap().split_by(&AcAutomaton::new(vec!["<some pattern>"])) {
        let bytes = section.expect("read error occurred");
        // do something with the bytes found between patterns
    }
}

About

Split anything implementing Read trait by multiple sequences of bytes

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages