StringSegmentCompare(StringSegment, StringSegment, Boolean, CultureInfo) Method

Compares two specified StringSegment instances, ignoring or honoring their case, and using the specified culture, 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: 8.1.0
C#
public static int Compare(
	StringSegment a,
	StringSegment b,
	bool ignoreCase,
	CultureInfo? culture
)

Parameters

a  StringSegment
The first string to compare.
b  StringSegment
The second string to compare.
ignoreCase  Boolean
to ignore case during the comparison; otherwise, .
culture  CultureInfo
An object that supplies culture-specific comparison information. if , then CultureInfo.CurrentCulture will be used.

Return Value

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

See Also