]>
Commit | Line | Data |
---|---|---|
bea08fec | 1 | |
15f05186 | 2 | .\" and Copyright (C) 2014 Michael Kerrisk <mtk.manpages@gmail.com> |
fea681da | 3 | .\" |
89e3ffe9 | 4 | .\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA) |
fea681da MK |
5 | .\" This is free documentation; you can redistribute it and/or |
6 | .\" modify it under the terms of the GNU General Public License as | |
7 | .\" published by the Free Software Foundation; either version 2 of | |
8 | .\" the License, or (at your option) any later version. | |
fe382ebf | 9 | .\" %%%LICENSE_END |
fea681da MK |
10 | .\" |
11 | .\" References consulted: | |
12 | .\" GNU glibc-2 source code and manual | |
13 | .\" Dinkumware C library reference http://www.dinkumware.com/ | |
008f1ecc | 14 | .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html |
fea681da MK |
15 | .\" ISO/IEC 9899:1999 |
16 | .\" | |
4b8c67d9 | 17 | .TH TOWUPPER 3 2017-09-15 "GNU" "Linux Programmer's Manual" |
fea681da | 18 | .SH NAME |
e139568f | 19 | towupper, towupper_l \- convert a wide character to uppercase |
fea681da MK |
20 | .SH SYNOPSIS |
21 | .nf | |
22 | .B #include <wctype.h> | |
68e4db0a | 23 | .PP |
fea681da | 24 | .BI "wint_t towupper(wint_t " wc ); |
dbfe9c70 | 25 | .PP |
e139568f | 26 | .BI "wint_t towupper_l(wint_t " wc ", locale_t " locale ); |
fea681da | 27 | .fi |
68e4db0a | 28 | .PP |
e139568f MK |
29 | .in -4n |
30 | Feature Test Macro Requirements for glibc (see | |
31 | .BR feature_test_macros (7)): | |
32 | .in | |
68e4db0a | 33 | .PP |
e139568f MK |
34 | .BR towupper_l (): |
35 | .PD 0 | |
36 | .RS 4 | |
37 | .TP | |
38 | Since glibc 2.10: | |
39 | _XOPEN_SOURCE\ >=\ 700 | |
40 | .TP | |
41 | Before glibc 2.10: | |
42 | _GNU_SOURCE | |
43 | .RE | |
44 | .PD | |
fea681da | 45 | .SH DESCRIPTION |
60a90ecd MK |
46 | The |
47 | .BR towupper () | |
48 | function is the wide-character equivalent of the | |
49 | .BR toupper (3) | |
50 | function. | |
35cfd378 MK |
51 | If |
52 | .I wc | |
15f05186 MK |
53 | is a lowercase wide character, |
54 | and there exists an uppercase equivalent in the current locale, | |
55 | it returns the uppercase equivalent of | |
56 | .IR wc . | |
57 | In all other cases, | |
58 | .I wc | |
59 | is returned unchanged. | |
847e0d88 | 60 | .PP |
e139568f MK |
61 | The |
62 | .BR towupper_l () | |
63 | function performs the same task, | |
64 | but performs the conversion based on the character type information in | |
65 | the locale specified by | |
66 | .IR locale . | |
67 | The behavior of | |
f3ece15a | 68 | .BR towupper_l () |
e139568f MK |
69 | is undefined if |
70 | .I locale | |
71 | is the special locale object | |
d8a86e74 | 72 | .B LC_GLOBAL_LOCALE |
e139568f MK |
73 | (see |
74 | .BR duplocale (3)) | |
75 | or is not a valid locale object handle. | |
847e0d88 | 76 | .PP |
15f05186 | 77 | The argument |
35cfd378 | 78 | .I wc |
15f05186 | 79 | must be representable as a |
d8a86e74 | 80 | .I wchar_t |
e139568f | 81 | and be a valid character in the locale or be the value |
35cfd378 | 82 | .BR WEOF . |
15f05186 MK |
83 | .SH RETURN VALUE |
84 | If | |
85 | .I wc | |
86 | was convertible to uppercase, | |
87 | .BR towupper () | |
88 | returns its uppercase equivalent; | |
89 | otherwise it returns | |
90 | .IR wc . | |
53c9ce2d MK |
91 | .SH VERSIONS |
92 | The | |
93 | .BR towupper_l () | |
94 | function first appeared in glibc 2.3. | |
c15158e2 | 95 | .SH ATTRIBUTES |
fd42d1ae PH |
96 | For an explanation of the terms used in this section, see |
97 | .BR attributes (7). | |
98 | .TS | |
99 | allbox; | |
100 | lb lb lb | |
101 | l l l. | |
102 | Interface Attribute Value | |
103 | T{ | |
c15158e2 | 104 | .BR towupper () |
fd42d1ae PH |
105 | T} Thread safety MT-Safe locale |
106 | T{ | |
107 | .BR towupper_l () | |
108 | T} Thread safety MT-Safe | |
109 | .TE | |
47297adb | 110 | .SH CONFORMING TO |
e139568f MK |
111 | .BR towupper (): |
112 | C99, POSIX.1-2001 (XSI); | |
113 | present as an XSI extension in POSIX.1-2008, but marked obsolete. | |
847e0d88 | 114 | .PP |
e139568f MK |
115 | .BR towupper_l (): |
116 | POSIX.1-2008. | |
fea681da | 117 | .SH NOTES |
e139568f | 118 | The behavior of these functions depends on the |
1274071a | 119 | .B LC_CTYPE |
e139568f | 120 | category of the locale. |
fea681da | 121 | .PP |
e139568f | 122 | These functions are not very appropriate for dealing with Unicode characters, |
fea681da | 123 | because Unicode knows about three cases: upper, lower and title case. |
47297adb | 124 | .SH SEE ALSO |
e37e3282 MK |
125 | .BR iswupper (3), |
126 | .BR towctrans (3), | |
e139568f MK |
127 | .BR towlower (3), |
128 | .BR locale (7) |