Crate bytecount [] [src]

Counting occurrences of a byte in a slice

There are two versions, one naive and simple (naive_count) and one (count) that uses unsafe a lot, but is screamingly fast. The algorithm is actually called "hyperscreamingcount".

Usage is like you would expect (count(haystack, needle)).

Functions

count

Count occurrences of a byte in a slice of bytes, fast

naive_count

Count occurrences of a byte in a slice of bytes, simple