Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ strxfrm(3C) — DG/UX R4.11

Media Vault

Software Library

Restoration Projects

Artifacts Sought



strxfrm(3C)                       SDK R4.11                      strxfrm(3C)


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 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.  The
       transformation is based on the program's locale for category
       LCCOLLATE [see setlocale(3C)].

       No more than n characters will be placed into the resulting array
       pointed to by s1, including the terminating null character.  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.

   Files
       /usr/lib/locale/locale/LCCOLLATE
                                LCCOLLATE database for locale.

   Errors
       On failure, strxfrm returns (sizet) -1.

   Considerations for Threads Programming
                     +---------+-----------------------------+
                     |         |                      async- |
                     |function | reentrant   cancel   cancel |
                     |         |             point     safe  |
                     +---------+-----------------------------+
                     |strxfrm  |     Y         Y        N    |
                     +---------+-----------------------------+
       strxfrm should be called when the other threads in a process are not
       in the process of changing the LCCOLLATE database.  See the
       setlocale(3C) man page for more information.

USAGE
       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);

REFERENCES
       colltbl(1M), reentrant(3), setlocale(3C), strcoll(3C), string(3C),
       environ(5)



Licensed material--property of copyright holder(s)

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