...
Scroll tablelayout | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
See Description section above for explanation of the return value.
Examples
Code Block | ||
---|---|---|
| ||
// Demonstrate string comparison. |
...
string $str1 = "Bob"; |
...
string $str2 = "Stan"; |
...
string $str3 = "bob"; |
...
int $val; |
...
...
// Compare the first two strings. |
...
$val = `strCompare $str1 $str2`; |
...
print $val; |
...
// Should be less than 0 |
...
...
// Compare the second and third strings. |
...
$val = `strCompare $str2 $str3`; |
...
print $val; |
...
// Should be less than 0 |
...
...
// Compare the first and the third. |
...
$val = `strCompare $str1 $str3`;print $val; |
...
// Should be less than 0 |
...
...
// Do a case insensitive search of the first and third |
...
$val = `strCompare $str1 $str3 -noCase`; |
...
print $val; |
...
// Should be 0 |
Scroll pagebreak |
---|
Additional information
...