String to search for needles in.
Strings to search for in haystack.
Indicates whether the comparisons are case sensitive.
import std.conv : to; ptrdiff_t i = "helloWorld".indexOfAny("Wr"); assert(i == 5); i = "öällo world".indexOfAny("lo "); assert(i == 4, to!string(i));
import std.conv : to; ptrdiff_t i = "helloWorld".indexOfAny("Wr", 4); assert(i == 5); i = "Foo öällo world".indexOfAny("lh", 3); assert(i == 8, to!string(i));
Returns the index of the first occurrence of any of the elements in needles in haystack. If no element of needles is found, then -1 is returned. The startIdx slices haystack in the following way haystack[startIdx .. $]. startIdx 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.