mirror of
https://github.com/edubart/otclient.git
synced 2025-10-16 04:24:54 +02:00
string:contains()
This commit is contained in:
@@ -49,3 +49,11 @@ function string:explode(sep, limit)
|
|||||||
table.insert(t, tmp)
|
table.insert(t, tmp)
|
||||||
return t
|
return t
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function string:contains(str, checkCase, start, plain)
|
||||||
|
if(not checkCase) then
|
||||||
|
self = self:lower()
|
||||||
|
str = str:lower()
|
||||||
|
end
|
||||||
|
return string.find(self, str, start and start or 1, plain == nil and true or false)
|
||||||
|
end
|
||||||
|
Reference in New Issue
Block a user