ContainsAny()

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

Checks if a read-only span contains any of two values.

template<typename T> bool System::MemoryExtensions::ContainsAny(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 search for
value1const T&The second value to search for

Return Value

true if any of the values is found in span, false otherwise

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

Checks if a read-only span contains any of three values.

template<typename T> bool System::MemoryExtensions::ContainsAny(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 search for
value1const T&The second value to search for
value2const T&The third value to search for

Return Value

true if any of the values is found in span, false otherwise

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

Checks if a mutable span contains any of two values.

template<typename T> bool System::MemoryExtensions::ContainsAny(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 mutable span to search in
value0const T&The first value to search for
value1const T&The second value to search for

Return Value

true if any of the values is found in span, false otherwise

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

Checks if a mutable span contains any of three values.

template<typename T> bool System::MemoryExtensions::ContainsAny(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 mutable span to search in
value0const T&The first value to search for
value1const T&The second value to search for
value2const T&The third value to search for

Return Value

true if any of the values is found in span, false otherwise

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

Checks if a read-only span contains any value from another span.

template<typename T> bool System::MemoryExtensions::ContainsAny(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 of values to search for

Return Value

true if any value from values is found in span, false otherwise

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

Checks if a mutable span contains any value from a read-only span.

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

Template parameters

ParameterDescription
TThe type of elements in the spans

Arguments

ParameterTypeDescription
spanconst Span<T>&The mutable span to search in
valuesconst ReadOnlySpan<T>&The read-only span of values to search for

Return Value

true if any value from values is found in span, false otherwise

See Also