Moduł:Narzędzia: Różnice pomiędzy wersjami
Z Nonsensopedii, polskiej encyklopedii humoru
Ostrzyciel (dyskusja • edycje) M |
Ostrzyciel (dyskusja • edycje) M |
||
Linia 16: | Linia 16: | ||
function p.firstLarge(frame) |
function p.firstLarge(frame) |
||
return p. |
return p._firstLarge(frame.args[1]) |
||
end |
end |
||
Wersja z 16:33, 9 mar 2020
local p = {}
function p.firstSmall(frame)
return p._firstSmall(frame.args[1])
end
function p._firstSmall(text)
if text == nil or text:len() == 0 then
return ''
end
text = string.sub(text, 1, 1):lower() .. string.sub(text, 2, -1)
return text
end
function p.firstLarge(frame)
return p._firstLarge(frame.args[1])
end
function p._firstLarge(text)
if text == nil or text:len() == 0 then
return ''
end
text = string.sub(text, 1, 1):upper() .. string.sub(text, 2, -1)
return text
end
return p