11 lines
194 B
Lua
11 lines
194 B
Lua
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
|