Click or drag to resize

__StringCompare Function

Compare 2 strings. This function is used by the compiler for string comparisons.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.0
Syntax
 FUNCTION __StringCompare(
	strLHS AS STRING,
	strRHS AS STRING
) AS LONG

Parameters

strLHS
Type: String
The first string .
strRHS
Type: String
The second string.

Return Value

Type: Int32
This function returns a numeric value to indicate the order in which the strings should be sorted:
-1LHS precedes RHS in the sort order.
0LHS occurs in the same position as RHS in the sort order.
1LHS follows RHS in the sort order.
Remarks
The StringCompare method takes into account:
- the setting of SetExact()
- the setting of VO13 of the main app
- the setting of Collation mode
This method respects the current setting of SetCollation():
- When the current collationmode is Clipper or Windows then a Unicode - Ansi conversions will be performed. The Clipper collation uses the current DOS codepage and the Windows collation the current Windows codepage.
- When the current collationmode is Unicode or Ordinal then the original strings will be compared.
See Also