Boyer-Moore string search: Difference between revisions
m
→{{header|Python}}
(Python example) |
|||
Line 68:
def alphabet_index(c: str) -> int:
"""Return the index of the given ASCII character.
val = ord(c)
assert val >= 0 and val < ALPHABET_SIZE
|