Skylords Reborn
Advertisement
Skylords Reborn

Edit documentation

Description

Provides a single function (counter) which can count the amount of instances of a string within another string.

See also


local p = {}
function p.counter(frame)
    local _, count = string.gsub(frame.args[1], frame.args[2], "")
    if count ~= nil then return count else return 0 end
end
return p
Advertisement