IndexOfAnyExceptInRange()

System::MemoryExtensions::IndexOfAnyExceptInRange(const ReadOnlySpan<T>&, const T&, const T&) function

Finds the index of the first element that is outside the specified range in a ReadOnlySpan

template<typename T> int32_t System::MemoryExtensions::IndexOfAnyExceptInRange(const ReadOnlySpan<T> &span, const T &lowInclusive, const T &highInclusive)

Template parameters

ParameterDescription
TThe type of elements in the span

Arguments

ParameterTypeDescription
spanconst ReadOnlySpan<T>&The span to search in
lowInclusiveconst T&The lower bound of the range (inclusive)
highInclusiveconst T&The upper bound of the range (inclusive)

Return Value

The zero-based index of the first element outside the range, or -1 if not found

System::MemoryExtensions::IndexOfAnyExceptInRange(const Span<T>&, const T&, const T&) function

Finds the index of the first element that is outside the specified range in a Span

template<typename T> int32_t System::MemoryExtensions::IndexOfAnyExceptInRange(const Span<T> &span, const T &lowInclusive, const T &highInclusive)

Template parameters

ParameterDescription
TThe type of elements in the span

Arguments

ParameterTypeDescription
spanconst Span<T>&The span to search in
lowInclusiveconst T&The lower bound of the range (inclusive)
highInclusiveconst T&The upper bound of the range (inclusive)

Return Value

The zero-based index of the first element outside the range, or -1 if not found

See Also