天软金融分析.NET函数大全
>
TSL函数
>
基础函数
>
字符串
>
常用字符串函数
CompareStr
复制链接
简述
字符串比较,如果S1大于S2,则返回正数,如果相等,返回0,否则返回负数
注意,大小写敏感,全角和半角字符敏感。
定义
CompareStr( S1; S2: String): Integer;
参数
名称
类型
说明
S1
String
字符串,比较字符1
S2
String
字符串,比较字符2
返回
Integer
整数
范例
Return CompareStr("万科A","万科A");
//输出:-65248
参考
CompareText
差异说明
返回值的绝对值大小无实际意义,仅符号有效。不同操作系统中,返回的绝对值会存在差异,但是在同一个操作系统中,结果是确定的。
如执行:return CompareStr("Tinysoft","tsl");
在Windows下返回-1,在Linux中返回:-2099710
相关
Str2Array
Array2Str
Chr
WideChr
Ord
StrCmp
Concat
Format
SetFormatLocalCode
GetFormatLocalCode
AnsiFormat
Pos
Copy
SetLength
LeftStr
RightStr
LeftBStr
RightBStr
MidBStr
GetChar
SetChar
Str
Val
CompareStr
UpperCase
LowerCase
AppendStr
CompareText
SameText
Trim
TrimLeft
TrimRight
IsValidIdent
IntToStr
IntToHex
StrToInt
StrToIntDef
TryStrToInt
StrToBool
StrToBoolDef
TryStrToBool
BoolToStr
Booltostr2
FloatToStr
CurrToStr
FormatFloat
FormatCurr
StrToFloat
StrToFloatDef
TryStrToFloat
StrToCurr
StrToCurrDef
TryStrToCurr
Tostring
SpaceByNumber
AnsiStr2Array
TryUppercase
TryLowercase
SysEncodecryptStr
Letters
DecToInt64
DecToInt64def
TryDecToInt64
DecToInt32
DecToInt32def
TryDecToInt32
StrToInt64
StrToInt64Def
TryStrToInt64
StrToInt32
StrToInt32Def
TryStrToInt32
DecToInt
DecToIntDef
TryDecToInt