Module:Trope

function string_formatting(s) local stringer = s:sub(1,1):upper..s:sub(2):lower return stringer end

function Troperize(tropename) local newstring = tropename:gsub("\'","") newstring = newstring:gsub("-"," ") newstring = newstring:gsub("–"," ") newstring = newstring:gsub("?","") newstring = newstring:gsub("!","") newstring = newstring:gsub("\"","")   newstring = newstring:gsub(",","")    local trope = {}    local numb = 0    for i in string.gmatch(newstring, "%S+") do        numb = numb+1        trope[numb] = i    end    newstring = ""    for key,value in pairs(trope) do        newstring = newstring .. string_formatting(trope[key])    end    return newstring end

local p = {} function p.main(frame) return Troperize(frame.args[1]) end return p