Table of Contents

Method IndexOfAnyExceptInRange

Namespace
Zyl.ExSpans
Assembly
ExSpans.dll

IndexOfAnyExceptInRange<T>(ExSpan<T>, T, T)

Searches for the first index of any value outside of the range between lowInclusive and highInclusive, inclusive.

public static nint IndexOfAnyExceptInRange<T>(this ExSpan<T> span, T lowInclusive, T highInclusive) where T : IComparable<T>

Parameters

span ExSpan<T>

The span to search.

lowInclusive T

A lower bound, inclusive, of the excluded range.

highInclusive T

A upper bound, inclusive, of the excluded range.

Returns

nint

The index in the span of the first occurrence of any value outside of the specified range. If all of the values are inside of the specified range, returns -1.

Type Parameters

T

The type of the span and values.

IndexOfAnyExceptInRange<T>(ReadOnlyExSpan<T>, T, T)

Searches for the first index of any value outside of the range between lowInclusive and highInclusive, inclusive.

public static nint IndexOfAnyExceptInRange<T>(this ReadOnlyExSpan<T> span, T lowInclusive, T highInclusive) where T : IComparable<T>

Parameters

span ReadOnlyExSpan<T>

The span to search.

lowInclusive T

A lower bound, inclusive, of the excluded range.

highInclusive T

A upper bound, inclusive, of the excluded range.

Returns

nint

The index in the span of the first occurrence of any value outside of the specified range. If all of the values are inside of the specified range, returns -1.

Type Parameters

T

The type of the span and values.