Modul:String: Unterschied zwischen den Versionen

keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 36: Zeile 36:
-- Removes all spaces at the start and at the end of a string
-- Removes all spaces at the start and at the end of a string
     return s:match("^%s*(.-)%s*$")
     return s:match("^%s*(.-)%s*$")
end
function p.lstrip(s)
-- Removes all spaces at the start of a string
return s:match("^%s*(.-)$")
end
function p.rstrip(s)
-- Removes all spaces at the end of a string
return s:gsub("%s+$", "")
end
end


return p
return p
82.367

Bearbeitungen