StringSegmentCompareTo(StringSegment) Method

Compares this instance to the specified StringSegment using ordinal comparison, and indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified StringSegment.

Definition

Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0-preview.1
C#
public int CompareTo(
	StringSegment other
)

Parameters

other  StringSegment
The StringSegment to compare with this instance.

Return Value

Int32
A 32-bit signed integer that indicates whether this instance precedes, follows, or appears in the same position in the sort order as the other parameter.

Implements

IComparableTCompareTo(T)

Remarks

  Note

Unlike the String.CompareTo method, this one performs an ordinal comparison. Use the Compare methods to perform a custom comparison.

See Also