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 strcoll( const char *s1, const char *s2 );
    #include <wchar.h>
    int wcscoll( const wchar_t *s1, const wchar_t *s2 );
    #include <mbstring.h>
    int _mbscoll( const unsigned char *s1, const unsigned char *s2 );

Description:
    The strcoll function compares the string pointed to by s1 to the string
    pointed to by s2.  The comparison uses the collating sequence selected
    by the  setlocale function.  The function will be equivalent to the
     strcmp function when the collating sequence is selected from the "C"
    locale.

    The wcscoll function is a wide-character version of strcoll that
    operates with wide-character strings.

    The _mbscoll function is a multibyte character version of strcoll that
    operates with multibyte character strings.

Returns:
    The strcoll 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, according to the
    collating sequence selected.

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

    char buffer[80] = "world";

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

Classification:
    strcoll is ANSI, wcscoll is ANSI, _mbscoll is not ANSI

Systems:
     strcoll - All, Netware

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

See Also:
    setlocale, strcmp, strncmp

See Also:

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