lastIndexOfAny

fnptrdiff_t lastIndexOfAny(Char, Char2)(const(Char)[] haystack, const(Char2)[] needles, in CaseSensitive cs = Yes.caseSensitive) if (isSomeChar!Char && isSomeChar!Char2) @safe pure

Searches haystack for the last occurrence of any of the characters in needles.

Parameters

haystackstring to search needles in
needlescharacters to search for in haystack
stopIdxindex in haystack to stop searching at (exclusive); defaults to haystack.length
csspecifies whether comparisons are case-sensitive (Yes.caseSensitive) or not (No.caseSensitive)

Returns

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.

fnptrdiff_t lastIndexOfAny(Char, Char2)(const(Char)[] haystack, const(Char2)[] needles, in size_t stopIdx, in CaseSensitive cs = Yes.caseSensitive) if (isSomeChar!Char && isSomeChar!Char2) @safe pure

Ditto