]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/towupper.3
gethostid.3: srcfix
[thirdparty/man-pages.git] / man3 / towupper.3
CommitLineData
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 18towupper, 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
28Feature 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
36Since glibc 2.10:
37_XOPEN_SOURCE\ >=\ 700
38.TP
39Before glibc 2.10:
40_GNU_SOURCE
41.RE
42.PD
fea681da 43.SH DESCRIPTION
60a90ecd
MK
44The
45.BR towupper ()
46function is the wide-character equivalent of the
47.BR toupper (3)
48function.
35cfd378
MK
49If
50.I wc
15f05186
MK
51is a lowercase wide character,
52and there exists an uppercase equivalent in the current locale,
53it returns the uppercase equivalent of
54.IR wc .
55In all other cases,
56.I wc
57is returned unchanged.
847e0d88 58.PP
e139568f
MK
59The
60.BR towupper_l ()
61function performs the same task,
62but performs the conversion based on the character type information in
63the locale specified by
64.IR locale .
65The behavior of
f3ece15a 66.BR towupper_l ()
e139568f
MK
67is undefined if
68.I locale
69is the special locale object
d8a86e74 70.B LC_GLOBAL_LOCALE
e139568f
MK
71(see
72.BR duplocale (3))
73or is not a valid locale object handle.
847e0d88 74.PP
15f05186 75The argument
35cfd378 76.I wc
15f05186 77must be representable as a
d8a86e74 78.I wchar_t
e139568f 79and be a valid character in the locale or be the value
35cfd378 80.BR WEOF .
15f05186
MK
81.SH RETURN VALUE
82If
83.I wc
84was convertible to uppercase,
85.BR towupper ()
86returns its uppercase equivalent;
87otherwise it returns
88.IR wc .
53c9ce2d
MK
89.SH VERSIONS
90The
91.BR towupper_l ()
92function first appeared in glibc 2.3.
c15158e2 93.SH ATTRIBUTES
fd42d1ae
PH
94For an explanation of the terms used in this section, see
95.BR attributes (7).
96.TS
97allbox;
98lb lb lb
99l l l.
100Interface Attribute Value
101T{
c15158e2 102.BR towupper ()
fd42d1ae
PH
103T} Thread safety MT-Safe locale
104T{
105.BR towupper_l ()
106T} Thread safety MT-Safe
107.TE
47297adb 108.SH CONFORMING TO
e139568f
MK
109.BR towupper ():
110C99, POSIX.1-2001 (XSI);
111present as an XSI extension in POSIX.1-2008, but marked obsolete.
847e0d88 112.PP
e139568f
MK
113.BR towupper_l ():
114POSIX.1-2008.
fea681da 115.SH NOTES
e139568f 116The behavior of these functions depends on the
1274071a 117.B LC_CTYPE
e139568f 118category of the locale.
fea681da 119.PP
e139568f 120These functions are not very appropriate for dealing with Unicode characters,
fea681da 121because 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)