1
2TOWUPPER(3)                Linux Programmer's Manual               TOWUPPER(3)
3
4
5

NAME

7       towupper, towupper_l - convert a wide character to uppercase
8

SYNOPSIS

10       #include <wctype.h>
11
12       wint_t towupper(wint_t wc);
13
14       wint_t towupper_l(wint_t wc, locale_t locale);
15
16   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
17
18       towupper_l():
19           Since glibc 2.10:
20                  _XOPEN_SOURCE >= 700
21           Before glibc 2.10:
22                  _GNU_SOURCE
23

DESCRIPTION

25       The  towupper()  function is the wide-character equivalent of the toup‐
26       per(3) function.  If wc is a lowercase wide character, and there exists
27       an uppercase equivalent in the current locale, it returns the uppercase
28       equivalent of wc.  In all other cases, wc is returned unchanged.
29
30       The towupper_l() function performs the same task, but performs the con‐
31       version based on the character type information in the locale specified
32       by locale.  The behavior of towupper_l() is undefined if locale is  the
33       special  locale  object LC_GLOBAL_LOCALE (see duplocale(3)) or is not a
34       valid locale object handle.
35
36       The argument wc must be representable as a wchar_t and be a valid char‐
37       acter in the locale or be the value WEOF.
38

RETURN VALUE

40       If  wc  was  convertible to uppercase, towupper() returns its uppercase
41       equivalent; otherwise it returns wc.
42

VERSIONS

44       The towupper_l() function first appeared in glibc 2.3.
45

ATTRIBUTES

47       For  an  explanation  of  the  terms  used   in   this   section,   see
48       attributes(7).
49
50       ┌─────────────┬───────────────┬────────────────┐
51Interface    Attribute     Value          
52       ├─────────────┼───────────────┼────────────────┤
53towupper()   │ Thread safety │ MT-Safe locale │
54       ├─────────────┼───────────────┼────────────────┤
55towupper_l() │ Thread safety │ MT-Safe        │
56       └─────────────┴───────────────┴────────────────┘

CONFORMING TO

58       towupper():  C99,  POSIX.1-2001  (XSI);  present as an XSI extension in
59       POSIX.1-2008, but marked obsolete.
60
61       towupper_l(): POSIX.1-2008.
62

NOTES

64       The behavior of these functions depends on the LC_CTYPE category of the
65       locale.
66
67       These functions are not very appropriate for dealing with Unicode char‐
68       acters, because Unicode knows about three cases: upper, lower and title
69       case.
70

SEE ALSO

72       iswupper(3), towctrans(3), towlower(3), locale(7)
73

COLOPHON

75       This  page  is  part of release 4.16 of the Linux man-pages project.  A
76       description of the project, information about reporting bugs,  and  the
77       latest     version     of     this    page,    can    be    found    at
78       https://www.kernel.org/doc/man-pages/.
79
80
81
82GNU                               2017-09-15                       TOWUPPER(3)
Impressum