indexOfNeither

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

Searches haystack for a character not in needles.

Parameters

haystackstring to search for needles in
needlescharacters to search for in haystack
startIdxindex of a well-formed code point in haystack to start searching from; defaults to 0
csspecifies whether comparisons are case-sensitive (Yes.caseSensitive) or not (No.caseSensitive)

Returns

The index of the first character in haystack that is not an element of

needles. If all characters of haystack are elements of needles or startIdx is greater than or equal to haystack.length, then -1 is returned. If the parameters are not valid UTF, the result will still be either -1 or in the range [startIdx .. haystack.length], but will not be reliable otherwise.

Throws

If the sequence starting at startIdx does not represent a well-formed

code point, then a UTFException may be thrown.

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

Ditto