INtime SDK Help
strcmp, strcmpi, stricmp, wcscmp, _wcsicmp

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);

Parameters

string1, string2
Strings to compare; must contain null characters marking the end of the strings.

Remarks

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.

Return Values

A value indicating the relationship:

Value Description
< 0 string1 less than string2
= 0 string1 identical to string2
> 0 string1 greater than string2

Generic Text Routines

tchar.h routine _UNICODE not defined _UNICODE defined
_tcscmp strcmp _wcscmp
_tcsicmp stricmp _wcsicmp

Requirements

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
See Also