Str.isin
From OpenEUO
Calling Pattern
Call
local r,c = sl.str.isin(s1,s2)
Args
s1 is a string s2 is a string
Results
r is a boolean c is a number
Usage Example
local s = sl.str local i = 'This is a test' local j = 'is' local r,c = s.isin(i,j) print(tostring(r)..' '..c)
--> true 3
Description
Determines if string s2 is a substring of string s1 and if so returns its position as well. See str.cnt for a similar function.
Upon Error
Isin fails silently. If s1 or s2 aren't strings, then nil is returned.