RuntimeState.StringCompare 方法 (Byte, Byte, Int32) | |
Compare 2 byte arrays respecting the runtime string comparison rules.
命名空间:
XSharp
程序集:
XSharp.Core (在 XSharp.Core.dll 中) 版本:2.22 GA
语法 STATIC METHOD StringCompare(
aLHS AS BYTE[],
aRHS AS BYTE[],
nLen AS LONG
) AS LONG
public static int StringCompare(
byte[] aLHS,
byte[] aRHS,
int nLen
)
查看代码参数
- aLHS
- 类型:Byte
The first list of bytes. - aRHS
- 类型:Byte
The second list of bytes. - nLen
- 类型:Int32
The # of bytes to compare.
返回值
类型:
Int32
此函数返回一个数字值,表示字符串在排序中的顺序:
值 | 描述 |
---|
-1 | LHS 在排序中的顺序在 RHS 之前。 |
0 | LHS 在排序中的位置与 RHS 相同。 |
1 | LHS 在排序中的顺序在 RHS 之后。 |
备注 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.
参见 引用
[P:CompilerOptionVO13]
[P:Exact]
[M:StringCompareCollation]