added contains
This commit is contained in:
parent
a4f6519b84
commit
00c68a76aa
@ -1,3 +1,12 @@
|
|||||||
|
function string:contains(table)
|
||||||
|
for i = 1, #table do
|
||||||
|
if table[i] == self then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
function string:ends_with(suffix)
|
function string:ends_with(suffix)
|
||||||
return suffix == "" or self:sub(-(#suffix)) == suffix
|
return suffix == "" or self:sub(-(#suffix)) == suffix
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user