Module:RandomCaps

local ins = table.insert local sub = string.sub local lower = string.lower local upper = string.upper local random = math.random return { main = function(frame) -- Theoretically faster than a simple gsub? local s0 = frame.args[1] local s1 = {} math.randomseed( os.time ) math.random for i=1,#s0 do           ins(                s1,                (random > 0.5 and lower or upper)( sub(s0,i,i) )            ) end return table.concat(s1) end }