Module:SentenceCase

local p = {} local getArgs = require('Module:Arguments').getArgs

function search(category, substrings) for k,v in pairs(substrings) do       if string.find(category, v) then return true end end return false end

function p.main(frame) local args        = getArgs(frame) local name        = args['1'] or '' return p.firstToUpper(name) end

-- https://stackoverflow.com/questions/2421695/first-character-uppercase-lua function p.firstToUpper(name) local keepLowercase = {"iQue", "iQue shirt", "iQueGBA", "amiibo shelf"} if search(name, keepLowercase) == true then return name else return (name:gsub("^%l", string.upper)) end end

return p