_stricmp, _wcsicmp (Windows CE 5.0)

Send Feedback

Developing an Application > Microsoft C Run-time Library for Windows CE > Run-time Library Reference

Perform a lowercase comparison of strings.

int _stricmp( const char *string1, const char *string2 );int _wcsicmp( const wchar_t *string1, constwchar_t *string2);

Parameters

  • string1, string2
    Null-terminated strings to compare.

Return Values

The return value indicates the relation of string1 to string2 as follows.

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

Remarks

These functions are supported by all versions of the C run-time libraries.

The _stricmp function lexicographically compares lowercase versions of string1 and string2 and returns a value indicating their relationship. _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 current locale.

Because _wcsicmp does lowercase comparisons, it can result in unexpected behavior.

_wcsicmp is a wide-character version of _stricmp. The arguments and return value of _wcsicmp are wide-character strings. These two functions behave identically otherwise.

_stricmp and strcmp behave identically except that strcmp does not convert its arguments to lowercase before comparing them.

The following table shows generic-text routine mappings for this function.

TCHAR.H Routine _UNICODE Defined
_tcsicmp _wcsicmp

For more information about TCHAR.H routines, see Generic Text Mappings.

Requirements

OS Versions: Windows CE 2.0 and later.

Header: stdio.h, string.h.

Link Library: coredll.dll.

See Also

memcmp | _memicmp | strcmp | strncmp

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.