Module:Utilities: Difference between revisions

Sur (talk | contribs)
m remove_var test
Sur (talk | contribs)
m url_encode initial
Line 69: Line 69:
    local result = str:gsub("(%l)(%u)", "%1 %2")
    local result = str:gsub("(%l)(%u)", "%1 %2")
    return result:gsub("(%u)(%u%l)", " %1%2")
    return result:gsub("(%u)(%u%l)", " %1%2")
end
--Much room for expansion here
function p.url_encode(str)
-- Just replaces spaces with %20
return string.gsub(input, " ", "%%20")
end
end
return p
return p