Se recomienda usar Visual Studio 2017
Esta documentación está archivada y no tiene mantenimiento.

_stricoll, _wcsicoll, _mbsicoll, _stricoll_l, _wcsicoll_l, _mbsicoll_l

Compare strings using locale-specific information.

int _stricoll(
   const char *string1,
   const char *string2 
int _wcsicoll(
   const wchar_t *string1,
   const wchar_t *string2 
int _mbsicoll(
   const unsigned char *string1,
   const unsigned char *string2 
int _stricoll_l(
   const char *string1,
   const char *string2,
   _locale_t locale
int _wcsicoll_l(
   const wchar_t *string1,
   const wchar_t *string2,
   _locale_t locale
int _mbsicoll_l(
   const unsigned char *string1,
   const unsigned char *string2,
   _locale_t locale

string1, string2

Null-terminated strings to compare.


The locale to use.

Each of these functions returns a value indicating the relationship of string1 to string2, as follows.

Return value

Relationship of string1 to string2

< 0

string1 less than string2


string1 identical to string2

> 0

string1 greater than string2


An error occurred.

Each of these functions returns _NLSCMPERROR. To use _NLSCMPERROR, include either STRING.H or MBSTRING.H. _wcsicoll can fail if either string1 or string2 contains wide-character codes outside the domain of the collating sequence. When an error occurs, _wcsicoll may set errno to EINVAL. To check for an error on a call to _wcsicoll, set errno to 0 and then check errno after calling _wcsicoll.

Each of these functions performs a case-insensitive comparison of string1 and string2 according to the code page currently in use. These functions should be used only when there is a difference between the character set order and the lexicographic character order in the current code page and this difference is of interest for the string comparison.

_stricmp differs from _stricoll in that the _stricmp comparison is affected by LC_CTYPE, whereas the _stricoll comparison is according to the LC_CTYPE and LC_COLLATE categories of the locale. For more information on the LC_COLLATE category, see setlocale and Locale Categories. The versions of these functions without the _l suffix use the current locale; the versions with the _l suffix are identical except that they use the locale passed in instead. For more information, see Locale.

All of these functions validate their parameters. If either string1 or string2 are NULL pointers, the invalid parameter handler is invoked, as described in Parameter Validation. If execution is allowed to continue, these functions return _NLSCMPERROR and set errno to EINVAL.

Generic-Text Routine Mappings

TCHAR.H routine

_UNICODE & _MBCS not defined

_MBCS defined

_UNICODE defined






Required header

_stricoll, _stricoll_l


_wcsicoll, _wcsicoll_l

<wchar.h>, <string.h>

_mbsicoll, _mbsicoll_l


For additional compatibility information, see Compatibility in the Introduction.