RuntimeState.StringCompare Method (Byte, Byte, Long) | |
Compare 2 byte arrays respecting the runtime string comparison rules.
Namespace:
XSharp
Assembly:
XSharp.Core (in XSharp.Core.dll) Version: 2.21
Syntax STATIC METHOD StringCompare(
aLHS AS BYTE[],
aRHS AS BYTE[],
nLen AS LONG
) AS LONG
public static int StringCompare(
byte[] aLHS,
byte[] aRHS,
int nLen
)
Request Example
View SourceParameters
- aLHS
- Type: Byte
The first list of bytes. - aRHS
- Type: Byte
The second list of bytes. - nLen
- Type: Long
The # of bytes to compare.
Return Value
Type:
Long
This function returns a numeric value to indicate the order in which the strings should be sorted:
-1 | LHS precedes RHS in the sort order. |
0 | LHS occurs in the same position as RHS in the sort order. |
1 | LHS follows RHS in the sort order. |
Remarks This method works on BYTE arrays and is used by the RDD system.
This method respects the current setting of SetCollation():
- When the current collationmode is Clipper or Windows then no Ansi - Unicode conversions will be done.The comparisons will be done on the byte arrays.
- When the current collationmode is Unicode or Ordinal then the byte arrays will be converted to Unicode before the comparison is executed.
See Also Reference
[P:CompilerOptionVO13]
[P:Exact]
[M:StringCompareCollation]