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