Content deleted Content added
HouseBlaster (talk | contribs) test |
HouseBlaster (talk | contribs) oops |
||
Line 1:
local p = {}
function p.main(
if not nextMatchRange then▼
return tostring(numberEncountered)▼
-- no more occurrences found, return the count
-- we found the next match, so increment the numberEncountered and update the currentStartIndex▼
else
numberEncountered = numberEncountered + 1 ▼
▲
end▼
currentStartIndex = nextMatchRange + 1 -- move past the current match
end
end
return p
|