| |||
| Home > RealView Debugger Predefined Macros > Alphabetical predefined macro reference > stricmp | |||
Compares two strings without case distinction.
int stricmp (str1, str2) char *str1; char *str2;
where:
str1Variable of type pointer to char. Specifies the location in memory of the first byte of a character string.
str2Variable of type pointer to char. Specifies the location in memory of the first byte of a character string.
This macro performs string comparison without case distinction.
The stricmp macro compares strings in ASCII sequence,
ignoring case.
intOne of the following:
<0Indicates that the second argument string value
comes after the first argument string value in the machine collating
sequences, independent of case distinction, str1 < str2.
0Indicates that the two strings are identical in content, independent of case distinction.
>0Indicates
that the first argument string value comes after the second argument
string value in the machine collating sequences, independent of
case distinction, str2 < str1.
Strings
are assumed to be NUL terminated or to fit within
the array boundaries.
Comparisons are always signed, regardless of how the string is declared.
This example shows how to use stricmp on
the command line:
> ce stricmp("abcDEF","ABCdef")
Result is: 0 0x00000000