StrCompare
InstallShield 2024 » InstallScript Language Reference
The StrCompare function compares two strings. The comparison is not case-sensitive.
Syntax
StrCompare ( szStringA, szStringB );
Parameters
Parameter |
Description |
szStringA |
Specifies the first string to compare. |
szStringB |
Specifies the second string to compare. |
Return Values
Return Value |
Description |
< 0 |
Indicates that the string in szStringA has a lower value than the string in szStringB. |
0 |
Indicates that the two strings are equal. |
> 0 |
Indicates that the string in szStringA has a greater value than the string in szStringB. |
Additional Information
The StrCompare function compares the strings by checking the first character in each string, the second character in each string, and so on—until it finds an inequality or reaches the ends of the strings.
The language driver for the language that you select determines which string is greater or if the strings are the same. If you do not use a language driver, Windows uses an internal function. With a double-byte character set (DBCS) version of Windows, this function can compare two DBCS strings.
See Also