Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C Library Reference - <u>synopsis:</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <string.h>
    int _strnicoll( const char *s1,
                    const char *s2,
                    size_t count );
    #include <wchar.h>
    int _wcsnicoll( const wchar_t *s1,
                    const wchar_t *s2,
                    size_t count );
    #include <mbstring.h>
    int _mbsnicoll( const unsigned char *s1,
                    const unsigned char *s2,
                    size_t count );

Description:
    These functions perform a case insensitive comparison of the first count
    characters of the string pointed to by s1 to the string pointed to by
    s2.  The comparison uses the current code page which can be selected by
    the  _setmbcp function.

    The _wcsnicoll function is a wide-character version of _strnicoll that
    operates with wide-character strings.

    The _mbsnicoll function is a multibyte character version of _strnicoll
    that operates with multibyte character strings.

Returns:
    These functions return an integer less than, equal to, or greater than
    zero, indicating that the string pointed to by s1 is less than, equal
    to, or greater than the string pointed to by s2, according to the
    collating sequence selected.  If an error occurs, these functions return
     _NLSCMPERR.  The  _wcsnicoll function may set  errno to  EINVAL to
    indicate that either string contains characters outside of the collating
    sequence of the current code page.

Example:
    #include <stdio.h>
    #include <string.h>

    char buffer[80] = "world";

    void main()
      {
        _setmbcp( 932 );
        if( _strnicoll( buffer, "Hello" ) < 0 ) {
            printf( "Less than\n" );
        }
      }

Classification:
    WATCOM

Systems:
     _strnicoll - All, Netware

    _wcsnicoll - All
    _mbsnicoll - DOS, Windows, Win386, Win32, OS/2 1.x(all), OS/2-32

See Also:
    _setmbcp, strcoll, stricmp, _stricoll, strncmp, _strncoll, strnicmp

See Also: _setmbcp

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson