VMS Help  —  CRTL  strcoll
    Compares two strings and returns an integer that indicates if
    the strings differ and how they differ. The function uses the
    collating information in the LC_COLLATE category of the current
    locale to determine how the comparison is performed.

    Format

      #include  <string.h>

      int strcoll  (const char *s1, const char *s2);

1  –  Arguments

 s1, s2

    Pointers to character strings.

2  –  Description

    The strcoll function, unlike strcmp, compares two strings in a
    locale-dependent manner. Because no value is reserved for error
    indication, the application must check for one by setting errno
    to 0 before the function call and testing it after the call.

    See also strxfrm.

3  –  Return Values

    < 0                Indicates that s1 is less than s2.
    > 0                Indicates that s1 is greater than s2.
Close Help