Debian Codegraph @

upstream/debian-trixie/man3/towupper.3

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