CorString: CompareCulturalEx

CompareCulturalEx

Compares substrings of 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 substrings to each other in the sort order.



 Public Function CompareCulturalEx(
	  ByRef StrA As String,
	  ByVal IndexA As Long,
	  ByRef StrB As String,
	  ByVal IndexB As Long,
	  ByVal Length,
	  ByVal Culture As CultureInfo,
	  ByVal Options As CompareOptions ) As Long

Parameters

StrA
[ByRef] String. The first string to use in the comparison.
IndexA
[ByVal] Long. The position of the substring within StrA.
StrB
[ByRef] String. The second string to use in the comparison.
IndexB
[ByVal] Long. The position of the substring within StrB.
Length
[ByVal] Variant. The maximum number of characters in the substrings 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