7 lines
216 B
Lua
7 lines
216 B
Lua
function string.starts(input, suffix)
|
|
return suffix == "" or string.sub(input, 1, string.len(suffix)) == suffix
|
|
end
|
|
|
|
function string.ends(input, ending)
|
|
return ending == "" or input:sub(-#ending) == ending
|
|
end |