Expand description
Shared byte-slice search over untrusted decode windows.
Empty needles are never a match. That matches the codec helpers this
module replaces and avoids memchr’s empty-needle-at-zero behavior.
Functions§
- contains
- Whether
needleoccurs inhaystack. Empty needles are absent. - find
- First offset of
needleinhaystack, orNonewhenneedleis empty. - find_
from - First offset of
needleat or afterfrom, orNonewhenneedleis empty. - find_in
- First offset of
needleinhaystack[start..end], returned as an absolute offset. - find_
iter - Offsets of every non-overlapping occurrence of
needle.