天软金融分析.NET函数大全
>
TSL函数
>
基础函数
>
字符串
>
常用字符串函数
StrCmp
复制链接
简述
比较s1与s2的ascii码值的大小,若s1较大,则返回正数,若相等,则返回0,若s2较大,则返回负数。返回值的绝对值大小无实际意义。
定义
StrCmp(s1; s2:String):Integer;
参数
名称
类型
说明
s1
String
字符串
s2
String
字符串
范例
a:=StrCmp("arr","arry");
return a; //
输出;-1
差异说明
返回值的绝对值大小无实际意义,在不同操作系统中,其绝对值大小也表现不一。
比如,对比字符或ASCII码的比较,在Linux中,返回ASCII码相差的值,Windows中只返回-1,0,1等代表大小,但是符号是一致的。
如strcmp(#97,#100);// Windows返回-1,Linux中返回-3。
相关
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