Skip to main content

find

Function find 

Source
pub fn find(
    hay: &[u8],
    pattern: &Pattern,
    from: u64,
    forward: bool,
    stop: &AtomicBool,
    progress: impl FnMut(u64),
) -> Result<HexHit, Stopped>
Expand description

Find pattern in hay: forward from from (a match there counts), round to the start; or backward from from (inclusive), round to the end. Reads a window at a time, looking at stop between, and tells progress how many bytes it has read.