inList()
inList(string, separator, token): bool
Split input string by separator into elements and compare each element with token.
string |
Input string. |
separator |
Elements separator. |
token |
Pattern to compare with. |
Return
True if token is found in input string.
>>> inList("1,2,3", ",", "1")
true
>>> inList("ab|cd|ef", "|", "test")
false