]>
Commit | Line | Data |
---|---|---|
224c7076 A |
1 | --- _SB/Libc/string/FreeBSD/strxfrm.3 2003-05-20 15:23:55.000000000 -0700 |
2 | +++ _SB/Libc/string/FreeBSD/strxfrm.3.edit 2006-06-28 16:55:53.000000000 -0700 | |
3 | @@ -40,34 +40,48 @@ | |
3d9156a7 A |
4 | .Dt STRXFRM 3 |
5 | .Os | |
6 | .Sh NAME | |
7 | -.Nm strxfrm | |
8 | +.Nm strxfrm , | |
9 | +.Nm strxfrm_l | |
10 | .Nd transform a string under locale | |
11 | .Sh LIBRARY | |
12 | .Lb libc | |
224c7076 | 13 | .Sh SYNOPSIS |
3d9156a7 A |
14 | .In string.h |
15 | .Ft size_t | |
224c7076 A |
16 | -.Fn strxfrm "char * restrict dst" "const char * restrict src" "size_t n" |
17 | +.Fo strxfrm | |
18 | +.Fa "char *restrict s1" | |
19 | +.Fa "const char *restrict s2" | |
20 | +.Fa "size_t n" | |
21 | +.Fc | |
22 | +.In string.h | |
3d9156a7 A |
23 | +.In xlocale.h |
24 | +.Ft size_t | |
224c7076 A |
25 | +.Fo strxfrm_l |
26 | +.Fa "char *restrict s1" | |
27 | +.Fa "const char *restrict s2" | |
28 | +.Fa "size_t n" | |
29 | +.Fa "locale_t loc" | |
30 | +.Fc | |
3d9156a7 A |
31 | .Sh DESCRIPTION |
32 | The | |
33 | .Fn strxfrm | |
224c7076 A |
34 | function transforms a null-terminated string pointed to by |
35 | -.Fa src | |
36 | +.Fa s2 | |
37 | according to the current locale collation if any, | |
38 | then copies the transformed string | |
39 | into | |
40 | -.Fa dst . | |
41 | +.Fa s1 . | |
42 | Not more than | |
43 | .Fa n | |
44 | characters are copied into | |
45 | -.Fa dst , | |
46 | +.Fa s1 , | |
47 | including the terminating null character added. | |
48 | If | |
49 | .Fa n | |
50 | is set to 0 | |
51 | (it helps to determine an actual size needed | |
52 | for transformation), | |
53 | -.Fa dst | |
54 | +.Fa s1 | |
55 | is permitted to be a NULL pointer. | |
56 | .Pp | |
57 | Comparing two strings using | |
58 | @@ -77,6 +91,14 @@ | |
3d9156a7 A |
59 | is equal to comparing |
60 | two original strings with | |
61 | .Fn strcoll . | |
62 | +.Pp | |
224c7076 | 63 | +Although the |
3d9156a7 A |
64 | +.Fn strxfrm |
65 | +function uses the current locale, the | |
66 | +.Fn strxfrm_l | |
67 | +function may be passed a locale directly. See | |
68 | +.Xr xlocale 3 | |
69 | +for more information. | |
70 | .Sh RETURN VALUES | |
71 | Upon successful completion, | |
72 | .Fn strxfrm | |
224c7076 A |
73 | @@ -85,13 +107,14 @@ |
74 | If this value is | |
75 | .Fa n | |
76 | or more, the contents of | |
77 | -.Fa dst | |
78 | +.Fa s1 | |
79 | are indeterminate. | |
80 | .Sh SEE ALSO | |
3d9156a7 A |
81 | .Xr setlocale 3 , |
82 | .Xr strcmp 3 , | |
83 | .Xr strcoll 3 , | |
84 | -.Xr wcsxfrm 3 | |
85 | +.Xr wcsxfrm 3 , | |
86 | +.Xr xlocale 3 | |
87 | .Sh STANDARDS | |
88 | The | |
89 | .Fn strxfrm |