IndexOfAnyExcept()

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

Finds the index of the first element that is not equal to the specified value in a ReadOnlySpan

template<typename T> int32_t System::MemoryExtensions::IndexOfAnyExcept(const ReadOnlySpan<T> &span, const T &value)

Template parameters

ParameterDescription
TThe type of elements in the span

Arguments

ParameterTypeDescription
spanconst ReadOnlySpan<T>&The span to search in
valueconst T&The value to exclude from the search

Return Value

The zero-based index of the first non-matching element, or -1 if not found

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

Finds the index of the first element that is not equal to either of two specified values in a ReadOnlySpan

template<typename T> int32_t System::MemoryExtensions::IndexOfAnyExcept(const ReadOnlySpan<T> &span, const T &value0, const T &value1)

Template parameters

ParameterDescription
TThe type of elements in the span

Arguments

ParameterTypeDescription
spanconst ReadOnlySpan<T>&The span to search in
value0const T&The first value to exclude from the search
value1const T&The second value to exclude from the search

Return Value

The zero-based index of the first non-matching element, or -1 if not found

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

Finds the index of the first element that is not equal to any of three specified values in a ReadOnlySpan

template<typename T> int32_t System::MemoryExtensions::IndexOfAnyExcept(const ReadOnlySpan<T> &span, const T &value0, const T &value1, const T &value2)

Template parameters

ParameterDescription
TThe type of elements in the span

Arguments

ParameterTypeDescription
spanconst ReadOnlySpan<T>&The span to search in
value0const T&The first value to exclude from the search
value1const T&The second value to exclude from the search
value2const T&The third value to exclude from the search

Return Value

The zero-based index of the first non-matching element, or -1 if not found

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

Finds the index of the first element that is not equal to the specified value in a Span

template<typename T> int32_t System::MemoryExtensions::IndexOfAnyExcept(const Span<T> &span, const T &value)

Template parameters

ParameterDescription
TThe type of elements in the span

Arguments

ParameterTypeDescription
spanconst Span<T>&The span to search in
valueconst T&The value to exclude from the search

Return Value

The zero-based index of the first non-matching element, or -1 if not found

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

Finds the index of the first element that is not equal to either of two specified values in a Span

template<typename T> int32_t System::MemoryExtensions::IndexOfAnyExcept(const Span<T> &span, const T &value0, const T &value1)

Template parameters

ParameterDescription
TThe type of elements in the span

Arguments

ParameterTypeDescription
spanconst Span<T>&The span to search in
value0const T&The first value to exclude from the search
value1const T&The second value to exclude from the search

Return Value

The zero-based index of the first non-matching element, or -1 if not found

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

Finds the index of the first element that is not equal to any of three specified values in a Span

template<typename T> int32_t System::MemoryExtensions::IndexOfAnyExcept(const Span<T> &span, const T &value0, const T &value1, const T &value2)

Template parameters

ParameterDescription
TThe type of elements in the span

Arguments

ParameterTypeDescription
spanconst Span<T>&The span to search in
value0const T&The first value to exclude from the search
value1const T&The second value to exclude from the search
value2const T&The third value to exclude from the search

Return Value

The zero-based index of the first non-matching element, or -1 if not found

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

Finds the index of the first element that is not equal to any value in a span of values.

template<typename T> int32_t System::MemoryExtensions::IndexOfAnyExcept(const ReadOnlySpan<T> &span, const ReadOnlySpan<T> &values)

Template parameters

ParameterDescription
TThe type of elements in the spans

Arguments

ParameterTypeDescription
spanconst ReadOnlySpan<T>&The span to search in
valuesconst ReadOnlySpan<T>&The span containing values to exclude from the search

Return Value

The zero-based index of the first non-matching element, or -1 if not found

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

Finds the index of the first element that is not equal to any value in a span of values in a Span

template<typename T> int32_t System::MemoryExtensions::IndexOfAnyExcept(const Span<T> &span, const ReadOnlySpan<T> &values)

Template parameters

ParameterDescription
TThe type of elements in the spans

Arguments

ParameterTypeDescription
spanconst Span<T>&The span to search in
valuesconst ReadOnlySpan<T>&The span containing values to exclude from the search

Return Value

The zero-based index of the first non-matching element, or -1 if not found

See Also