|
kmpSearch
kmpSearch (self, text, pattern)
|
Added to advas-0.1.5, and adjusted in advas-0.2.5
Uses the algorithm from Knuth, Morris and Pratt to locate the given pattern in the text.
In: |
text |
text to be used for searching |
|
pattern |
text to be looked up in the text
|
Out: |
|
a list of positions the pattern starts in the text |
|
|