unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-4.1.3)
Page:
Section:
Apropos / Subsearch:
optional field

STRCOLL(3)                 Library Functions Manual                 STRCOLL(3)



NAME
       strcoll,  strxfrm - compare or transform strings using collating infor-
       mation

SYNOPSIS
       #include <&lt;string.h>&gt;

       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 s1 to the string pointed to
       by  s2.  These strings are interpreted as appropriate to the LC_COLLATE
       category of the current locale.

       strxfrm() transforms the string pointed to by s2 and places the result-
       ing string into the array pointed to by s1.  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 s1, including the terminating null character.   If  n  is
       zero,  s1  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 s1 is greater
       than, equal to or less than the string pointed to by s2 when  both  are
       interpreted  as  appropriate  to  the current locale.  On failure, str-
       coll() 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 s1 are indeterminate.  On fail-
       ure,  strxfrm()  returns  (size_t)-1,  and  sets  errno to indicate the
       error.

ERRORS
       EINVAL         s1 or s2 contain characters outside the  domain  of  the
                      collating sequence.

SEE ALSO
       string(3)



                                21 January 1990                     STRCOLL(3)