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 strnicmp( const char *s1,
                  const char *s2,
                  size_t len );
    int _strnicmp( const char *s1,
                   const char *s2,
                   size_t len );
    int _fstrnicmp( const char __far *s1,
                    const char __far *s2,
                    size_t len );
    #include <wchar.h>
    int _wcsnicmp( const wchar_t *s1,
                   const wchar_t *s2,
                   size_t len );
    #include <mbstring.h>
    int _mbsnicmp( const unsigned char *s1,
                   const unsigned char *s2,
                   size_t n );
    int _fmbsnicmp( const unsigned char __far *s1,
                    const unsigned char __far *s2,
                    size_t n );

Description:
    The strnicmp function compares, without case sensitivity, the string
    pointed to by s1 to the string pointed to by s2, for at most len
    characters.

    The _strnicmp function is identical to strnicmp.  Use _strnicmp for
    ANSI/ISO naming conventions.

    The _fstrnicmp function is a data model independent form of the strnicmp
    function that accepts far pointer arguments.  It is most useful in mixed
    memory model applications.

    The _wcsnicmp function is a wide-character version of strnicmp that
    operates with wide-character strings.

    The _mbsnicmp function is a multibyte character version of strnicmp that
    operates with multibyte character strings.

    The _fmbsnicmp function is a data model independent form of the
    _mbsnicmp function that accepts far pointer arguments.  It is most
    useful in mixed memory model applications.

Returns:
    The strnicmp function returns 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.

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

    void main()
      {
        printf( "%d\n", strnicmp( "abcdef", "ABCXXX", 10 ) );
        printf( "%d\n", strnicmp( "abcdef", "ABCXXX",  6 ) );
        printf( "%d\n", strnicmp( "abcdef", "ABCXXX",  3 ) );
        printf( "%d\n", strnicmp( "abcdef", "ABCXXX",  0 ) );
      }

    produces the following:

    -20
    -20
    0
    0

Classification:
    WATCOM

_strnicmp conforms to ANSI/ISO naming conventions

Systems:
     strnicmp - All, Netware

    _strnicmp - All, Netware
    _fstrnicmp - All
    _wcsnicmp - All
    _mbsnicmp - DOS, Windows, Win386, Win32, OS/2 1.x(all), OS/2-32
    _fmbsnicmp - DOS, Windows, Win386, Win32, OS/2 1.x(all), OS/2-32

See Also:
    strcmp, stricmp, strncmp

See Also:

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