


STRCOLL(3)             C LIBRARY FUNCTIONS             STRCOLL(3)



NAME
     strcoll, strxfrm - compare or transform strings  using  col-
     lating information

SYNOPSIS
     #include <string.h>

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

     size_t strxfrm(s1, s2, n)
     char *s1;
     char *s2;
     size_t n;

DESCRIPTION
     strcoll() compares the string pointed to by _s_1 to the string
     pointed   to  by  _s_2.   These  strings  are  interpreted  as
     appropriate  to  the  LC_COLLATE  category  of  the  current
     locale.

     strxfrm() transforms the string pointed to by _s_2 and  places
     the  resulting  string into the array pointed to by _s_1.  The
     transformation is such that if string() is  applied  to  two
     transformed  strings, it returns a value greater than, equal
     to, or less than zero, corresponding to the  result  of  the
     strcoll() function applied to the same two original strings.
     No more than _n characters  are  placed  into  the  resulting
     array pointed to by _s_1, including the terminating null char-
     acter.  If _n is zero, _s_1 is permitted to be a null  pointer.
     If  copying  takes  place  between objects that overlap, the
     behavior is undefined.

RETURN VALUES
     On success, strcoll() returns an integer greater than, equal
     to or less than zero, respectively, if the string pointed to
     by _s_1 is greater than, equal to  or  less  than  the  string
     pointed to by _s_2 when both are interpreted as appropriate to
     the current locale.  On failure,  strcoll()  sets  errno  to
     indicate the error, but returns no special value.

     strxfrm() returns the length of the transformed string,  not
     including  the  terminating  null  character.   If the value
     returned is _n or more, the contents of the array pointed  to
     by  _s_1  are  indeterminate.   On  failure, strxfrm() returns
     (size_t)-1, and sets errno to indicate the error.

ERRORS
     EINVAL         _s_1  or  _s_2  contain  characters  outside  the
                    domain of the collating sequence.




Sun Release 4.1   Last change: 21 January 1990                  1






STRCOLL(3)             C LIBRARY FUNCTIONS             STRCOLL(3)



SEE ALSO
     string(3)





















































Sun Release 4.1   Last change: 21 January 1990                  2



