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.


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

Property Value




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