Module:siwa-noun: Difference between revisions

No edit summary
No edit summary
Line 8: Line 8:
local find = mw.ustring.find
local find = mw.ustring.find
local gmatch = mw.ustring.gmatch
local gmatch = mw.ustring.gmatch
local gsubn = mw.ustring.gsub
local rsubn = mw.ustring.gsub
local u = mw.ustring.char
local u = mw.ustring.char
local split = mw.text.split
local split = mw.text.split
Line 31: Line 31:
}
}


-- version of gsubn() that discards all but the first return value
-- version of rsubn() that discards all but the first return value
local function gsub(term, foo, bar, n)
local function rsub(term, foo, bar, n)
local retval = gsubn(term, foo, bar, n)
local retval = rsubn(term, foo, bar, n)
return retval
return retval
end
end