Compares substrings without regard to case.
#include <string.h> int strnicmp(const char *string1, const char *string2, size_t count); int _strnicmp(const char *string1, const char *string2, size_t count); int strncasecmp(const char *string1, const char *string2, size_t count);
#include <wchar.h>
int _wcsnicmp(const wchar_t *string1, const wchar_t *string2, size_t count);
string1
, string2
count
Lexicographically compares at most the first count characters of string1
and string2
.
strnicmp is a case-insensitive version of strncmp. _strnicmp and strncasecmp are alternate names for strnicmp.
_wcsnicmp is a wide-character
A value indicating the relationship:
Value | Description |
---|---|
< 0 | string1 less than string2 |
= 0 | string1 equal to string2 |
> 0 | string1 greater than string2 |
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 |