]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) |
2 | .\" | |
93015253 | 3 | .\" %%%LICENSE_START(VERBATIM) |
fea681da MK |
4 | .\" Permission is granted to make and distribute verbatim copies of this |
5 | .\" manual provided the copyright notice and this permission notice are | |
6 | .\" preserved on all copies. | |
7 | .\" | |
8 | .\" Permission is granted to copy and distribute modified versions of this | |
9 | .\" manual under the conditions for verbatim copying, provided that the | |
10 | .\" entire resulting derived work is distributed under the terms of a | |
11 | .\" permission notice identical to this one. | |
c13182ef | 12 | .\" |
fea681da MK |
13 | .\" Since the Linux kernel and libraries are constantly changing, this |
14 | .\" manual page may be incorrect or out-of-date. The author(s) assume no | |
15 | .\" responsibility for errors or omissions, or for damages resulting from | |
16 | .\" the use of the information contained herein. The author(s) may not | |
17 | .\" have taken the same level of care in the production of this manual, | |
18 | .\" which is licensed free of charge, as they might when working | |
19 | .\" professionally. | |
c13182ef | 20 | .\" |
fea681da MK |
21 | .\" Formatted or processed versions of this manual, if unaccompanied by |
22 | .\" the source, must acknowledge the copyright and authors of this work. | |
4b72fb64 | 23 | .\" %%%LICENSE_END |
fea681da MK |
24 | .\" |
25 | .\" References consulted: | |
26 | .\" Linux libc source code | |
27 | .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) | |
28 | .\" 386BSD man pages | |
29 | .\" Modified Sun Jul 25 10:41:28 1993 by Rik Faith (faith@cs.unc.edu) | |
460495ca | 30 | .TH STRXFRM 3 2015-08-08 "GNU" "Linux Programmer's Manual" |
fea681da MK |
31 | .SH NAME |
32 | strxfrm \- string transformation | |
33 | .SH SYNOPSIS | |
34 | .nf | |
35 | .B #include <string.h> | |
36 | .sp | |
37 | .BI "size_t strxfrm(char *" dest ", const char *" src ", size_t " n ); | |
38 | .fi | |
39 | .SH DESCRIPTION | |
60a90ecd MK |
40 | The |
41 | .BR strxfrm () | |
46d8df8e MK |
42 | function transforms the |
43 | .I src | |
44 | string into a | |
60a90ecd MK |
45 | form such that the result of |
46 | .BR strcmp (3) | |
47 | on two strings that have | |
48 | been transformed with | |
49 | .BR strxfrm () | |
50 | is the same as the result of | |
51 | .BR strcoll (3) | |
52 | on the two strings before their transformation. | |
46d8df8e MK |
53 | The first |
54 | .I n | |
55 | bytes of the transformed string are placed in | |
56 | .IR dest . | |
c13182ef | 57 | The transformation is based on the program's current |
46d8df8e MK |
58 | locale for category |
59 | .BR LC_COLLATE . | |
ef800a18 | 60 | (See |
60a90ecd | 61 | .BR setlocale (3)). |
47297adb | 62 | .SH RETURN VALUE |
60a90ecd MK |
63 | The |
64 | .BR strxfrm () | |
65 | function returns the number of bytes required to | |
46d8df8e MK |
66 | store the transformed string in |
67 | .I dest | |
68 | excluding the | |
71d9e7ae | 69 | terminating null byte (\(aq\\0\(aq). |
46d8df8e MK |
70 | If the value returned is |
71 | .I n | |
72 | or more, the | |
73 | contents of | |
74 | .I dest | |
75 | are indeterminate. | |
56111899 MS |
76 | .SH ATTRIBUTES |
77 | For an explanation of the terms used in this section, see | |
78 | .BR attributes (7). | |
79 | .TS | |
80 | allbox; | |
81 | lb lb lb | |
82 | l l l. | |
83 | Interface Attribute Value | |
84 | T{ | |
85 | .BR strxfrm () | |
86 | T} Thread safety MT-Safe locale | |
87 | .TE | |
47297adb | 88 | .SH CONFORMING TO |
91d3cef7 | 89 | POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD. |
fea681da | 90 | .SH NOTES |
51700fd7 | 91 | In the |
46d8df8e MK |
92 | .IR POSIX |
93 | or | |
94 | .IR C | |
95 | locales | |
60a90ecd MK |
96 | .BR strxfrm () |
97 | is equivalent to | |
98 | copying the string with | |
99 | .BR strncpy (3). | |
47297adb | 100 | .SH SEE ALSO |
fea681da MK |
101 | .BR bcmp (3), |
102 | .BR memcmp (3), | |
103 | .BR setlocale (3), | |
104 | .BR strcasecmp (3), | |
105 | .BR strcmp (3), | |
3e5c319e MK |
106 | .BR strcoll (3), |
107 | .BR string (3) |