findSkip

fnbool findSkip(alias pred = "a == b", R1, R2)(ref R1 haystack, R2 needle) if (isForwardRange!R1 && isForwardRange!R2 && is(typeof(binaryFun!pred(haystack.front, needle.front))))

Finds needle in haystack and positions haystack right after the first occurrence of needle.

If no needle is provided, the haystack is advanced as long as pred evaluates to true. Similarly, the haystack is positioned so as pred evaluates to false for haystack.front.

For more information about pred see find.

Parameters

haystackThe forward range to search in.
needleThe forward range to search for.
predCustom predicate for comparison of haystack and needle

Returns

true if the needle was found, in which case haystack is

positioned after the end of the first occurrence of needle; otherwise false, leaving haystack untouched. If no needle is provided, it returns the number of times pred(haystack.front) returned true.

See Also

fnsize_t findSkip(alias pred, R1)(ref R1 haystack) if (isForwardRange!R1 && ifTestable!(typeof(haystack.front), unaryFun!pred))

ditto