mirror of
https://github.com/Refactorio/RedMew.git
synced 2024-12-14 10:13:13 +02:00
10 lines
218 B
Lua
10 lines
218 B
Lua
|
--luacheck: globals string
|
||
|
|
||
|
--- Removes whitespace from the start and end of the string.
|
||
|
-- http://lua-users.org/wiki/StringTrim
|
||
|
function string.trim(str)
|
||
|
return (str:gsub("^%s*(.-)%s*$", "%1"))
|
||
|
end
|
||
|
|
||
|
return string
|