Click or drag to resize

RuntimeState.StringCompare Method (String, String)

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

Namespace:  XSharp
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.19
Syntax
 STATIC METHOD StringCompare(
	strLHS AS STRING,
	strRHS AS STRING
) AS LONG
Request Example View Source

Parameters

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

Return Value

Type: Long
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

Reference

[P:CompilerOptionVO13]
[P:Exact]
[M:StringCompareCollation]