MCPcopy Create free account
hub / github.com/TheAlgorithms/Rust / boyer_moore_search

Function boyer_moore_search

src/string/boyer_moore_search.rs:85–125  ·  view source on GitHub ↗

Performs the Boyer-Moore string search algorithm, which searches for all occurrences of a pattern within a text. The Boyer-Moore algorithm is efficient for large texts and patterns, as it skips sections of the text based on the bad character rule and other optimizations. # Arguments `text` - The text to search within as a string slice. `pat` - The pattern to search for as a string slice. # Retu

(text: &str, pat: &str)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 5

build_bad_char_tableFunction · 0.85
calc_match_shiftFunction · 0.85
calc_mismatch_shiftFunction · 0.85
pushMethod · 0.80
lenMethod · 0.45

Tested by

no test coverage detected