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