multimaze/utils/strings.lua

12 lines
194 B
Lua
Raw Normal View History

local M = {}
function M.starts_with(str, start)
return str:sub(1, #start) == start
end
function M.ends_with(str, ending)
return ending == "" or str:sub(-#ending) == ending
end
return M