2020-09-19 22:57:11 +08:00
|
|
|
|
|
|
|
local str = {}
|
|
|
|
|
|
|
|
|
|
|
|
function str.trim(str)
|
|
|
|
return str:match( "^%s*(.-)%s*$" )
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
function str.fill(str, length, ...)
|
|
|
|
if string.len(str) > length then
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
return str
|
|
|
|
|
2019-07-11 18:26:29 +08:00
|
|
|
-- @todo add lua string api
|
2020-09-19 22:57:11 +08:00
|
|
|
|