1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2024-12-12 10:04:40 +02:00
RedMew/utils/string.lua
James Gillham ca381aa289 Add config-restart command.
- change Restart command to use server.start_game (offers setting the mod pack).
- Change danger ores and crashsite maps to use the new restart command.
2021-05-15 11:21:46 +01:00

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