shithub: scc

ref: 08a32f26c08c322c5549b94c05032d2e87f1df3c
dir: /doc/man3/strxfrm.3/

View raw version
.TH strxfrm 3
.SH NAME
strxfrm - string transformation
.SH SYNOPSIS
#include <string.h>

size_t strxfrm(char *restrict s1, const char *restrict s2, size_t n)
.SH DESCRIPTION
The
.BR strxfrm ()
function transforms
the string pointed to by
.I s2
and places the resulting string
into the array pointed to by
.IR s1 .
The transformation is such that
if the strcmp function 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.
.PP
No more than n characters shall be placed into
the resulting array pointed to by
.IR s1 ,
including the terminating null character.
If n is zero,
.I s1
is permitted to be a null pointer.
.PP
If copying takes place between objects that overlap,
the behaviour is undefined.
.SH RETURN VALUE
The
.BR strxfrm ()
function shall return the length of
the transformed string
(not including the terminating null character).
If the value returned is
.I n
or more,
the contents of the array pointed to
.I s1
are indeterminate.
.SH STANDARDS
ISO/IEC 9899:1999 Section 7.21.4.5