Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ strxfrm(3C) — svr4 — mips UMIPS RISC/os 5.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

setlocale(3C-SVR4)

strcoll(3C-SVR4)

string(3C-SVR4)

environ(5-SVR4)

colltbl(1M)



STRXFRM(3C-SVR4)    RISC/os Reference Manual     STRXFRM(3C-SVR4)



NAME
     strxfrm - string transformation

SYNOPSIS
     #include <string.h>

     sizet strxfrm (char *s1, const char *s2, sizet n);

DESCRIPTION
     strxfrm transforms the string s2 and places the resulting
     string into the array s1.  The transformation is such that
     if strcmp is applied to two transformed strings, it will
     return the same result as strcoll applied to the same two
     original strings.  The transformation is based on the
     program's locale for category LC_COLLATE [see setlocale(3C-
     SVR4)].

     No more than n characters will be placed into the resulting
     array pointed to by s1, including the terminating null char-
     acter. If n is 0, then s1 is permitted to be a null pointer.
     If copying takes place between objects that overlap, the
     behavior is undefined.

     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 s1 are
     indeterminate.

EXAMPLE
     The value of the following expression is the size of the
     array needed to hold the transformation of the string
     pointed to by s.

          1 + strxfrm(NULL, s, 0);

FILES
     /<systype>/usr/lib/locale/<locale>/LC_COLLATE
                              LC_COLLATE database for locale.

SEE ALSO
     setlocale(3C-SVR4), strcoll(3C-SVR4), string(3C-SVR4),
     environ(5-SVR4).
     colltbl(1M) in the System Administrator's Reference Manual.

DIAGNOSTICS
     On failure, strxfrm returns (size_t)-1.









                        Printed 11/19/92                   Page 1



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026