- StringAdd
- StringBufferLen
- StringCompare
- StringConcatenate
- StringFill
- StringFind
- StringGetCharacter
- StringInit
- StringLen
- StringSetLength
- StringReplace
- StringReserve
- StringSetCharacter
- StringSplit
- StringSubstr
- StringToLower
- StringToUpper
- StringTrimLeft
- StringTrimRight
StringCompare
The function compares two strings and returns the comparison result in form of an integer.
int StringCompare(
|
Parameters
string1
[in] The first string.
string2
[in] The second string.
case_sensitive=true
[in] Case sensitivity mode selection. If it is true, then "A">"a". If it is false, then "A"="a". By default the value is equal to true.
Return Value
- -1 (minus one), if string1<string2
- 0 (zero), if string1=string2
- 1 (one), if string1>string2
Note
The strings are compared symbol by symbol, the symbols are compared in the alphabetic order in accordance with the current code page.
Example:
void OnStart()
|
See also
String Type, CharToString(), ShortToString(), StringToCharArray(), StringToShortArray(), StringGetCharacter(), Use of a Codepage