StringSegmentCompare(StringSegment, StringSegment, StringComparison) Method

Compares two specified StringSegment instances using the specified comparison, and returns an integer that indicates their relative position in the sort order.

Definition

Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0
C#
public static int Compare(
	StringSegment a,
	StringSegment b,
	StringComparison comparison = StringComparison.Ordinal
)

Parameters

a  StringSegment
The first string to compare.
b  StringSegment
The second string to compare.
comparison  StringComparison  (Optional)
A StringComparison value that specifies how to perform the comparison. This parameter is optional.
Default value: Ordinal.

Return Value

Int32
A 32-bit signed integer that indicates the lexical relationship between the specified StringSegment instances.

See Also