Expand description
Text search helpers.
This module provides simple search APIs over a UTF-8 &str, using character offsets
(not byte offsets) for all public inputs/outputs. It supports:
- plain substring search (escaped and compiled into a regex)
- regex search
- optional whole-word matching
Structs§
- Search
Match - A match returned by the search APIs, expressed as a half-open character range.
- Search
Options - Options that control how search is performed.
Enums§
- Search
Error - Search errors.
Functions§
- find_
all - Find all occurrences of
queryintext. - find_
next - Find the next occurrence of
queryintext, searching forward fromfrom_char. - find_
prev - Find the previous occurrence of
queryintext, searching backward fromfrom_char. - is_
match_ exact - Returns
trueifrangeexactly matches an occurrence ofqueryintext.