String to search for needles in.
Strings to search for in haystack.
Indicates whether the comparisons are case sensitive.
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);
Returns the index of the last occurrence of any of the elements in needles in haystack. If no element of needles is found, then -1 is returned. The stopIdx slices haystack in the following way s[0 .. stopIdx]. stopIdx represents a codeunit index in haystack. If the sequence ending at startIdx does not represent a well formed codepoint, then a std.utf.UTFException may be thrown.