SequenceCompareTo()

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

Compares two ReadOnlySpans lexicographically.

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

Template parameters

ParameterDescription
TThe type of elements in the spans

Arguments

ParameterTypeDescription
spanconst ReadOnlySpan<T>&The first span to compare
otherconst ReadOnlySpan<T>&The second span to compare

Return Value

-1 if span < other, 0 if span == other, 1 if span > other

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

Compares a Span and ReadOnlySpan lexicographically.

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

Template parameters

ParameterDescription
TThe type of elements in the spans

Arguments

ParameterTypeDescription
spanconst Span<T>&The Span to compare
otherconst ReadOnlySpan<T>&The ReadOnlySpan to compare

Return Value

-1 if span < other, 0 if span == other, 1 if span > other

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

Compares a ReadOnlySpan and Span lexicographically.

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

Template parameters

ParameterDescription
TThe type of elements in the spans

Arguments

ParameterTypeDescription
spanconst ReadOnlySpan<T>&The ReadOnlySpan to compare
otherconst Span<T>&The Span to compare

Return Value

-1 if span < other, 0 if span == other, 1 if span > other

See Also