Module:Sandbox/Squc/Test Explained

-- Testing module

local p=

function p.test1 (frame) local input = frame.args[1] local find = frame.args["find"] local output = "" for i=1, #input do output = (output..mw.ustring.sub(input, i, i)..",") if find and mw.ustring.sub(input,i,i)

find then output=(output.."[Found at "..i.."]") end end return outputend

function p.test2 (frame) local a = frame.args[1] local b = frame.args[2] local c = frame.args[3] if not a then a = "nil" end if not b then b = "nil" end if not c then c = "nil" end return "a = "..a..", b = "..b..", c = "..c.."."end

return p