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 stricmp( const char *s1, const char *s2 );
    int _stricmp( const char *s1, const char *s2 );
    int _fstricmp( const char __far *s1,
                   const char __far *s2 );
    #include <wchar.h>
    int _wcsicmp( const wchar_t *s1, const wchar_t *s2 );
    #include <mbstring.h>
    int _mbsicmp( const unsigned char *s1,
                  const unsigned char *s2 );
    int _fmbsicmp( const unsigned char __far *s1,
                   const unsigned char __far *s2 );

Description:
    The stricmp function compares, with case insensitivity, the string
    pointed to by s1 to the string pointed to by s2.  All uppercase
    characters from s1 and s2 are mapped to lowercase for the purposes of
    doing the comparison.

    The _stricmp function is identical to stricmp.  Use _stricmp for
    ANSI/ISO naming conventions.

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

    The _wcsicmp function is a wide-character version of stricmp that
    operates with wide-character strings.

    The _mbsicmp function is a multibyte character version of stricmp that
    operates with multibyte character strings.

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

Returns:
    The stricmp 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", stricmp( "AbCDEF", "abcdef" ) );
        printf( "%d\n", stricmp( "abcdef", "ABC"    ) );
        printf( "%d\n", stricmp( "abc",    "ABCdef" ) );
        printf( "%d\n", stricmp( "Abcdef", "mnopqr" ) );
        printf( "%d\n", stricmp( "Mnopqr", "abcdef" ) );
      }

    produces the following:

    0
    100
    -100
    -12
    12

Classification:
    WATCOM

_stricmp conforms to ANSI/ISO naming conventions

Systems:
     stricmp - All, Netware

    _stricmp - All, Netware
    _fstricmp - All
    _wcsicmp - All
    _mbsicmp - DOS, Windows, Win386, Win32, OS/2 1.x(all), OS/2-32
    _fmbsicmp - DOS, Windows, Win386, Win32, OS/2 1.x(all), OS/2-32

See Also:
    strcmp, strcmpi, strncmp, strnicmp

See Also:

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