LastIndexOfAnyExceptInRange()

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

Finds the last occurrence of any element outside the specified range within a span.

template<typename T> int32_t System::MemoryExtensions::LastIndexOfAnyExceptInRange(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 within
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 last element outside the range, or -1 if not found

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

Finds the last occurrence of any element outside the specified range within a mutable span.

template<typename T> int32_t System::MemoryExtensions::LastIndexOfAnyExceptInRange(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 within
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 last element outside the range, or -1 if not found

See Also