StringSegmentComparerOrdinal Property

Gets a StringSegmentComparer object that performs a case-sensitive ordinal string comparison.
The methods of the returned StringSegmentComparer instance can be called with string, StringSegment and ReadOnlySpan<char> parameter values, which will not allocate new strings on any platform.

Definition

Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0
C#
public static StringSegmentComparer Ordinal { get; }

Property Value

StringSegmentComparer

Remarks

  Note

The comparer returned by this property does not generate randomized hash codes for strings no longer than 32 characters (and for longer strings it is platform-dependent). Use the OrdinalRandomized property to get a comparer with randomized hash for any lengths on all platforms, or the OrdinalNonRandomized property to never use randomized hash codes.

See Also