Table of Contents

Method CompareTo

Namespace
Zyl.ExSpans
Assembly
ExSpans.dll

CompareTo(ReadOnlyExSpan<char>, ReadOnlyExSpan<char>, StringComparison)

Compares the specified span and other using the specified comparisonType, and returns an integer that indicates their relative position in the sort order.

public static int CompareTo(this ReadOnlyExSpan<char> span, ReadOnlyExSpan<char> other, StringComparison comparisonType)

Parameters

span ReadOnlyExSpan<char>

The source span.

other ReadOnlyExSpan<char>

The value to compare with the source span.

comparisonType StringComparison

One of the enumeration values that determines how the span and other are compared.

Returns

int

Exceptions

ExSpanTooLongException

Throws an exception if the length is out of the range of Int32.