Skip to main content

Crate ashwa

Crate ashwa 

Source
Expand description

Hardware accelerated routines for single substring search

§Example

use ashwa::search_one;

let haystack = b"The quick brown fox jumps over the lazy dog";
assert_eq!(search_one(haystack, b'f'), Some(0x10));
assert_eq!(search_one(haystack, b'z'), Some(0x25));
assert_eq!(search_one(haystack, b'!'), None);

Functions§

search_one
Searches for the first occurrence of a single byte (needle) in a byte slice (haystack)