stricmp( param1, param2 )


Parameters

  Type Description
param1 string first string to compare
param2 string second string to compare

_result

Set to a numeric value that specifies the order of param1 and param2.

Value Description
<0 param1 is less than param2
0 param1 is equal to param2
>0 param1 is greater than param2

Descriptions

Compares the two strings param1 and param1, setting _result to a value that indicates their lexicographic (alphabetical) order. The stricmp command performs a case insensitive comparison. _result is set to a value less than 0 if param1 is less than param2, to 0 if param1 is equal to param2, and to a value greater than 0 if param1 is greater than param2.

String values may also be compared with both the isequal command and logical operators. Both of the techniques, however, perform case sensitive comparisons. The stricmp command exists to perform case insensitive string comparisons.

In the example below _result is set to 0 since, ignoring case, the two strings are equal.

param1 = "Hello"
param2 = "hELLO"
stricmp( param1, param2 )

See Also

strlen, strins, strmid, strfind, strbreak, strspan, strrev, strtrim, strlower, strupper, operators