Content deleted Content added
lower |
ucfirst? |
||
Line 10:
local function stripwhitespace(text)
return text:match("^%s*(.-)%s*$")
end
local function ucfirst(s)
local first = s:sub(1, 1)
local others = s:sub(2, -1)
return first:upper() .. others
end
local function bordercss(c, w)
Line 389 ⟶ 394:
local res = ''
if (#colornames > 0) then
colornames[1] = ucfirst(colornames[1])
end
if (#colornames == 1) then
res = colornames[1]
elseif (#colornames == 2) then
res = colornames[1] .. ' and ' .. colornames[2]
elseif (#colornames > 2) then
res = colornames[1]
for i=2,#colornames do
if( i < #colornames ) then
res = res .. ', ' .. colornames[i]
else
res = res .. ', and ' .. colornames[i]
end
end
|