Debian Codegraph @

upstream/debian-unstable/man3/strxfrm.3

raw
1 '\" t
2 .\" Copyright 1993, David Metcalfe <[email protected]>
3 .\" Copyright, the authors of the Linux man-pages project
4 .\"
5 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .\"
7 .TH strxfrm 3 2026-02-08 "Linux man-pages 6.18"
8 .SH NAME
9 strxfrm \- string transformation
10 .SH LIBRARY
11 Standard C library
12 .RI ( libc ,\~ \-lc )
13 .SH SYNOPSIS
14 .nf
15 .B #include <string.h>
16 .P
17 .BR "size_t strxfrm(" "size_t size;"
18 .BI " char " dest "[restrict " size "], const char " src "[restrict " size ],
19 .BI " size_t " size );
20 .fi
21 .SH DESCRIPTION
22 The
23 .BR strxfrm ()
24 function transforms the
25 .I src
26 string into a
27 form such that the result of
28 .BR strcmp (3)
29 on two strings that have
30 been transformed with
31 .BR strxfrm ()
32 is the same as the result of
33 .BR strcoll (3)
34 on the two strings before their transformation.
35 The first
36 .I size
37 bytes of the transformed string are placed in
38 .IR dest .
39 The transformation is based on the program's current
40 locale for category
41 .BR LC_COLLATE .
42 (See
43 .BR setlocale (3)).
44 .SH RETURN VALUE
45 The
46 .BR strxfrm ()
47 function returns the number of bytes required to
48 store the transformed string in
49 .I dest
50 excluding the
51 terminating null byte (\[aq]\[rs]0\[aq]).
52 If the value returned is
53 .I size
54 or more, the
55 contents of
56 .I dest
57 are indeterminate.
58 .SH ATTRIBUTES
59 For an explanation of the terms used in this section, see
60 .BR attributes (7).
61 .TS
62 allbox;
63 lbx lb lb
64 l l l.
65 Interface Attribute Value
66 T{
67 .na
68 .nh
69 .BR strxfrm ()
70 T} Thread safety MT-Safe locale
71 .TE
72 .SH STANDARDS
73 C11, POSIX.1-2008.
74 .SH HISTORY
75 POSIX.1-2001, C89, SVr4, 4.3BSD.
76 .SH SEE ALSO
77 .BR memcmp (3),
78 .BR setlocale (3),
79 .BR strcasecmp (3),
80 .BR strcmp (3),
81 .BR strcoll (3),
82 .BR string (3)