Content deleted Content added
HouseBlaster (talk | contribs) oops |
HouseBlaster (talk | contribs) tostring not needed |
||
(One intermediate revision by the same user not shown) | |||
Line 2:
function p.main()
▲ if not nextMatchRange then
▲ -- no more occurrences found, return the count
else
▲ return tostring(numberEncountered)
▲ -- found a match, so increment the counter and update the current start index
▲ numberEncountered = numberEncountered + 1
▲ currentStartIndex = nextMatchRange + 1 -- move past the current match
▲ end
end
|