Boyer-Moore string search: Difference between revisions

m
→‎{{header|J}}: stay closer to the spirit of the algorithm
(J)
m (→‎{{header|J}}: stay closer to the spirit of the algorithm)
Line 75:
while. (#y) >: (#x)+startPos do.
skip=. 0
for_idxidx=. i.-#x do.
while. 0 <: idx=. idx-1 do.
if. (idx{x) ~: (startPos+idx) { y do.
skip=. 1 >. idx - rightMap {~ 3 u: y {~ startPos + idx
Line 87 ⟶ 88:
end.
end.
_''
}}</lang>
 
6,962

edits