Module:Search

Revision as of 07:14, 8 June 2017 by M3lkor (talk | contribs) (Created page with "p = {} Arg1 = mw.getCurrentFrame().args[1] Arg2 = mw.getCurrentFrame().args[2] function searchList() toret = 0 itemspl = mw.text.split(Arg2,';',true) for i, item...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:Search/doc

p = {}

Arg1 = mw.getCurrentFrame().args[1]
Arg2 = mw.getCurrentFrame().args[2]

function searchList()
    toret = 0
    itemspl = mw.text.split(Arg2,';',true)
    for i, item in pairs(itemspl) do
        tstr = string.find(Arg1, item,1,true)
        if tstr == true then
            toret = 1
            break
        end
    end
    return toret
end

return p