1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2024-12-14 10:13:13 +02:00
RedMew/utils/string.lua

10 lines
218 B
Lua
Raw Normal View History

--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