scc

A fork of https://git.simple-cc.org/scc/ for Qute

git clone https://git.8pit.net/scc.git

 1.TH strxfrm 3 scc\-VERSION
 2.SH NAME
 3strxfrm - transform a string for locale-aware comparison
 4.SH SYNOPSIS
 5#include <string.h>
 6
 7size_t strxfrm(char *restrict s1, const char *restrict s2, size_t n)
 8.SH DESCRIPTION
 9The
10.BR strxfrm ()
11function transforms the string at
12.I s2
13and writes the result into the array at
14.IR s1 .
15The transformation is defined such that applying
16.B strcmp
17to two transformed strings yields the same ordering as applying
18.B strcoll
19to the corresponding original strings.
20.PP
21At most
22.I n
23characters, including the terminating null byte,
24are written to
25.IR s1 .
26When
27.I n
28is zero,
29.I s1
30may be a null pointer.
31.PP
32Overlapping source and destination regions produce undefined behavior.
33.SH RETURN VALUE
34The
35.BR strxfrm ()
36function returns the length of the transformed string,
37not counting the terminating null byte.
38If the returned value is
39.I n
40or greater, the content of
41.I s1
42is indeterminate.
43.SH STANDARDS
44ISO/IEC 9899:1999 Section 7.21.4.5