417 bytes added
, 9 years ago
local NanaminFunctions = {}
function NanaminFunctions.split(haystack, needle)
local result = {}
while mw.ustring.find(haystack, needle) do
local split = mw.ustring.find(haystack, needle)
table.insert(result, mw.ustring.sub(haystack, 1, split - 1))
haystack = mw.ustring.sub(haystack, split + 1)
end
table.insert(result, haystack)
return result
end
return NanaminFunctions