Moduł:Narzędzia: Różnice pomiędzy wersjami
Z Nonsensopedii, polskiej encyklopedii humoru
Ostrzyciel (dyskusja • edycje) (to się przyda później) |
Ostrzyciel (dyskusja • edycje) |
||
Linia 8: | Linia 8: | ||
text = string.sub(text, 1, 1):lower() .. string.sub(text, 2, -1) |
text = string.sub(text, 1, 1):lower() .. string.sub(text, 2, -1) |
||
return text |
|||
end |
|||
function p.firstlarge(frame) |
|||
local text = frame.args[1] |
|||
if text == nil or text:len() == 0 then |
|||
return '' |
|||
end |
|||
text = string.sub(text, 1, 1):upper() .. string.sub(text, 2, -1) |
|||
return text |
return text |
Wersja z 21:13, 24 lut 2019
local p = {}
function p.firstsmall(frame)
local text = frame.args[1]
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)
local text = frame.args[1]
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