Lexicographically compares two null-terminated strings.
#include <string.h> int strcmp(const char *string1, const char *string2); int strcmpi(const char *string1, const char *string2); int _strcmpi(const char *string1, const char *string2); int stricmp(const char *string1, const char *string2); int _stricmp(const char *string1, const char *string2); int strcasecmp(const char *string1, const char *string2);
#include <wchar.h>
int wcscmp(const wchar_t *string1, const wchar_t *string2);
int _wcsicmp(const wchar_t *string1, const wchar_t *string2);
string1, string2 
strcmpi and stricmp are case-insensitive versions of strcmp. They work identically in all other respects. _strcmpi and _stricmp are alternate names for strcmpi and stricmp.
strcasecmp is an alias for strcmpi.
wcscmp and _wcsicmp are wide-character versions of strcmp and stricmp respectively.
A value indicating the relationship:
| Value | Description | 
|---|---|
| < 0 | string1 less than string2 | 
| = 0 | string1 identical to string2 | 
| > 0 | string1 greater than string2 | 
tchar.h routine | 
_UNICODE not defined | 
_UNICODE defined | 
|---|---|---|
| _tcscmp | strcmp | _wcscmp | 
| _tcsicmp | stricmp | _wcsicmp | 
| Versions | Defined in | Include | Link to | 
|---|---|---|---|
| INtime 3.0 INtime 6.0 (for wide-character and generic text versions)  | 
intime/rt/include/string.h intime/rt/include/wchar.h intime/rt/include/tchar.h  | 
string.h wchar.h tchar.h  | 
clib.lib |