CorString: CompareCultural

CompareCultural

Compares two specified String objects using the specified comparison options and culture-specific information to influence the comparison, and returns an integer that indicates the relationship of the two strings to each other in the sort order.



 Public Function CompareCultural(
	  ByRef StrA As String,
	  ByRef StrB As String,
	  ByVal Culture As CultureInfo,
	  ByVal Options As CompareOptions ) As Long

Parameters

StrA
[ByRef] String. The first string to compare.
StrB
[ByRef] String. The second string to compare.
Culture
[ByVal] CultureInfo. The culture that supplies culture-specific comparison information.
Options
[ByVal] CompareOptions. Options to use when performing the comparison (such as ignoring case or symbols).

Return Values

Long -  A 32-bit signed integer that indicates the lexical relationship between StrA and StrB, as shown in the following table
Value Condition
Less than zeroStrA is less than StrB.
ZeroStrA equals StrB.
Greater than zeroStrA is greater than StrB.

See Also

Project CorLib Overview

Class CorString Overview