]>
Commit | Line | Data |
---|---|---|
fea681da | 1 | .\" Copyright (c) Bruno Haible <haible@clisp.cons.org> |
04b5684a | 2 | .\" and Copyright (C) 2014 Michael Kerrisk <mtk.manpages@gmail.com> |
fea681da | 3 | .\" |
e4a74ca8 | 4 | .\" SPDX-License-Identifier: GPL-2.0-or-later |
fea681da MK |
5 | .\" |
6 | .\" References consulted: | |
7 | .\" GNU glibc-2 source code and manual | |
8 | .\" Dinkumware C library reference http://www.dinkumware.com/ | |
008f1ecc | 9 | .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html |
fea681da MK |
10 | .\" ISO/IEC 9899:1999 |
11 | .\" | |
4c1c5274 | 12 | .TH towlower 3 (date) "Linux man-pages (unreleased)" |
fea681da | 13 | .SH NAME |
d0f02849 | 14 | towlower, towlower_l \- convert a wide character to lowercase |
73c7fdb3 AC |
15 | .SH LIBRARY |
16 | Standard C library | |
8fc3b2cf | 17 | .RI ( libc ", " \-lc ) |
fea681da MK |
18 | .SH SYNOPSIS |
19 | .nf | |
20 | .B #include <wctype.h> | |
68e4db0a | 21 | .PP |
fea681da | 22 | .BI "wint_t towlower(wint_t " wc ); |
d0f02849 | 23 | .BI "wint_t towlower_l(wint_t " wc ", locale_t " locale ); |
fea681da | 24 | .fi |
68e4db0a | 25 | .PP |
d39ad78f | 26 | .RS -4 |
d0f02849 MK |
27 | Feature Test Macro Requirements for glibc (see |
28 | .BR feature_test_macros (7)): | |
d39ad78f | 29 | .RE |
68e4db0a | 30 | .PP |
d0f02849 | 31 | .BR towlower_l (): |
9d2adbae MK |
32 | .nf |
33 | Since glibc 2.10: | |
5c10d2c5 | 34 | _XOPEN_SOURCE >= 700 |
9d2adbae MK |
35 | Before glibc 2.10: |
36 | _GNU_SOURCE | |
37 | .fi | |
fea681da | 38 | .SH DESCRIPTION |
60a90ecd MK |
39 | The |
40 | .BR towlower () | |
41 | function is the wide-character equivalent of the | |
42 | .BR tolower (3) | |
43 | function. | |
35cfd378 MK |
44 | If |
45 | .I wc | |
04b5684a MK |
46 | is an uppercase wide character, |
47 | and there exists a lowercase equivalent in the current locale, | |
48 | it returns the lowercase equivalent of | |
49 | .IR wc . | |
50 | In all other cases, | |
51 | .I wc | |
52 | is returned unchanged. | |
847e0d88 | 53 | .PP |
d0f02849 | 54 | The |
afdd425e | 55 | .BR towlower_l () |
d0f02849 MK |
56 | function performs the same task, |
57 | but performs the conversion based on the character type information in | |
58 | the locale specified by | |
59 | .IR locale . | |
60 | The behavior of | |
afdd425e | 61 | .BR towlower_l () |
d0f02849 MK |
62 | is undefined if |
63 | .I locale | |
64 | is the special locale object | |
d8a86e74 | 65 | .B LC_GLOBAL_LOCALE |
d0f02849 MK |
66 | (see |
67 | .BR duplocale (3)) | |
68 | or is not a valid locale object handle. | |
847e0d88 | 69 | .PP |
04b5684a | 70 | The argument |
35cfd378 | 71 | .I wc |
04b5684a | 72 | must be representable as a |
d8a86e74 | 73 | .I wchar_t |
d0f02849 | 74 | and be a valid character in the locale or be the value |
35cfd378 | 75 | .BR WEOF . |
04b5684a MK |
76 | .SH RETURN VALUE |
77 | If | |
78 | .I wc | |
79 | was convertible to lowercase, | |
80 | .BR towlower () | |
81 | returns its lowercase equivalent; | |
82 | otherwise it returns | |
83 | .IR wc . | |
909eb7e9 MK |
84 | .SH VERSIONS |
85 | The | |
86 | .BR towlower_l () | |
87 | function first appeared in glibc 2.3. | |
1c9b2a60 | 88 | .SH ATTRIBUTES |
6e8ec3fe PH |
89 | For an explanation of the terms used in this section, see |
90 | .BR attributes (7). | |
c466875e MK |
91 | .ad l |
92 | .nh | |
6e8ec3fe PH |
93 | .TS |
94 | allbox; | |
c466875e | 95 | lbx lb lb |
6e8ec3fe PH |
96 | l l l. |
97 | Interface Attribute Value | |
98 | T{ | |
1c9b2a60 | 99 | .BR towlower () |
6e8ec3fe PH |
100 | T} Thread safety MT-Safe locale |
101 | T{ | |
102 | .BR towlower_l () | |
103 | T} Thread safety MT-Safe | |
104 | .TE | |
c466875e MK |
105 | .hy |
106 | .ad | |
107 | .sp 1 | |
3113c7f3 | 108 | .SH STANDARDS |
d0f02849 MK |
109 | .BR towlower (): |
110 | C99, POSIX.1-2001 (XSI); | |
111 | present as an XSI extension in POSIX.1-2008, but marked obsolete. | |
847e0d88 | 112 | .PP |
d0f02849 MK |
113 | .BR towlower_l (): |
114 | POSIX.1-2008. | |
fea681da | 115 | .SH NOTES |
d0f02849 | 116 | The behavior of these functions depends on the |
1274071a | 117 | .B LC_CTYPE |
d0f02849 | 118 | category of the locale. |
fea681da | 119 | .PP |
d0f02849 | 120 | These functions are not very appropriate for dealing with Unicode characters, |
735334d4 | 121 | because Unicode knows about three cases: upper, lower, and title case. |
47297adb | 122 | .SH SEE ALSO |
e37e3282 MK |
123 | .BR iswlower (3), |
124 | .BR towctrans (3), | |
d0f02849 MK |
125 | .BR towupper (3), |
126 | .BR locale (7) |