Modul:String: Unterschied zwischen den Versionen

+ appendWithSeparator()
(+ appendWithComma(s, a))
(+ appendWithSeparator())
 
Zeile 120: Zeile 120:
end
end


function p.appendWithComma(s, a)
function p.appendWithSeparator(s, sep, a)
if a ~= nil and a ~= "" then
if a ~= nil and a ~= "" then
if s ~= "" then
if s ~= "" then
s = s .. ", " .. a
s = s .. sep .. a
else
else
s = a
s = a
Zeile 129: Zeile 129:
end
end
return s
return s
end
function p.appendWithComma(s, a)
return p.appendWithSeparator(s, ", ", a)
end
end


return p
return p