2 releases

0.1.1 May 1, 2016
0.1.0 Nov 8, 2015
Download history 109/week @ 2019-08-08 253/week @ 2019-08-15 285/week @ 2019-08-22 174/week @ 2019-08-29 878/week @ 2019-09-05 1350/week @ 2019-09-12 154/week @ 2019-09-19 1024/week @ 2019-09-26 328/week @ 2019-10-03 485/week @ 2019-10-10 121/week @ 2019-10-17 1616/week @ 2019-10-24 1378/week @ 2019-10-31

775 downloads per month
Used in 8 crates (4 directly)


172 lines


This is a crate for substring searching (with functionality similar to the memmem function in C). So far, it only contains a copy of the two-way search implementation from rust's standard library (but with an API that allows searching in &[u8]). Eventually, we plan to provide other searching algorithms, and possibly also some heuristics to choose a good searching algorithm based on the substring we are looking for.

Build status Coverage Status



A crate for string searching. The main trait is Searcher, which has a function for finding fixed things in long byte-strings. Currently, the only implementer of Searcher is TwoWaySearcher.


use memmem::{Searcher, TwoWaySearcher};
let search = TwoWaySearcher::new("dog".as_bytes());
assert_eq!(search.search_in("The quick brown fox jumped over the lazy dog.".as_bytes()), Some(41));

No runtime deps