string to search 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 occurrence of any of the characters of needles in haystack. If no character of needles is found 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.
ptrdiff_t i = "helloWorld".lastIndexOfAny("Wlo"); assert(i == 8); i = "Foo öäöllo world".lastIndexOfAny("öF"); assert(i == 8);
import std.conv : to; ptrdiff_t i = "helloWorld".lastIndexOfAny("Wlo", 4); assert(i == 3); i = "Foo öäöllo world".lastIndexOfAny("öF", 3); assert(i == 0);
Searches haystack for the last occurrence of any of the characters in needles.