1
0
mirror of https://github.com/veden/Rampant.git synced 2024-12-30 21:19:46 +02:00
Rampant/libs/StringUtils.lua
2018-01-18 23:25:32 -08:00

16 lines
345 B
Lua
Executable File

local stringUtils = {}
function stringUtils.isRampant(str)
return stringUtils.ends(str, "rampant")
end
function stringUtils.starts(str, start)
return (string.sub(str,1,string.len(start)) == start)
end
function stringUtils.ends(str, tail)
return (tail == '') or (string.sub(str, -string.len(tail)) == tail)
end
return stringUtils