String matching: Difference between revisions

Content added Content deleted
Line 203: Line 203:
property d : (length of needle) - 1
property d : (length of needle) - 1
on |λ|(x, i, xs)
on |λ|(x, i, xs)
if mx d + i then
set z to d + i
needle = text i thru (d + i) of xs
if mx z then
needle = text i thru z of xs
else
else
false
false