Module:String2: Difference between revisions

Content deleted Content added
fix
Reverted to revision 868634255 by RexxS (talk): Test order. (TW)
Line 100:
-- It takes the text to be searched as the first unnamed parameter, which is trimmed.
-- It takes the text to search for as the second unnamed parameter, which is trimmed and
-- any doubledoubel quotes " are stripped out.
p.posnq = function(frame)
local str = mw.text.trim(frame.args[1] or "")
local match = mw.text.trim(frame.args[2] or ""):gsub('"', '')
match = match:gsub('"', '')
if str == "" or match == "" then return nil end
-- just take the start position