ContainsAnyInRange()

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

Checks if a read-only span contains any element within the specified range.

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

Template parameters

ParameterDescription
TThe type of elements in the span (must be comparable)

Arguments

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

Return Value

true if any element within the range is found, false otherwise

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

Checks if a mutable span contains any element within the specified range.

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

Template parameters

ParameterDescription
TThe type of elements in the span (must be comparable)

Arguments

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

Return Value

true if any element within the range is found, false otherwise

See Also