find_keyword

Function find_keyword 

Source
pub fn find_keyword(content: &[u8], upper: &[u8]) -> Option<usize>
Expand description

Byte offset of the first case-folded occurrence of upper in content, anywhere (not only at a record’s keyword position): the whole-file “is this entity present at all” prefilter. upper must be uppercase ASCII and non-empty.

A hit inside a string literal is a false positive that costs the caller one scan it would otherwise have skipped, the same trade the case-sensitive memmem probe it replaces already made.