string to search for needles in
characters to search for in haystack
specifies whether comparisons are case-sensitive (Yes.caseSensitive) or not (No.caseSensitive)
The index of the last character in haystack that is not an element of needles. If all characters of haystack are in needles or stopIdx is 0, then -1 is returned. If the parameters are not valid UTF, the result will still be in the range [-1 .. stopIdx], but will not be reliable otherwise.
assert(lastIndexOfNeither("abba", "a") == 2); assert(lastIndexOfNeither("def", "f") == 1);
assert(lastIndexOfNeither("def", "rsa", 3) == -1); assert(lastIndexOfNeither("abba", "a", 2) == 1);
Searches for the last character in haystack that is not in needles.