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