Boyer-Moore string search: Difference between revisions

m (There's some statistical issues relevant to substring positions and testing, so might as well make it easy for people who want to exercise that sort of thing)
Line 61:
)
)
 
(let ((pattern "alfalfa")
(full_text "Nearby farms grew a half acre of alfalfa on the dairy's behalf, with bales of all that alfalfa exchanged for milk."))
(bm_substring_search pattern full_text)
)
</lang>
 
outputs:
 
<pre>33</pre>
 
=={{header|Julia}}==
59

edits