Skip to main content

find_all

Function find_all 

Source
pub fn find_all(
    haystack: &str,
    needle: &str,
    options: &MatchOptions,
) -> Vec<Match>
Expand description

Every occurrence of needle in haystack, in original char offsets.

Folds the haystack, searches it, and throws the fold away. For a single search that is exactly right. For a search box — where the same corpus is searched again on every keystroke — see FoldedText, which keeps the fold.