1towupper(3)                Library Functions Manual                towupper(3)
2
3
4

NAME

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

LIBRARY

9       Standard C library (libc, -lc)
10

SYNOPSIS

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

DESCRIPTION

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

RETURN VALUE

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

ATTRIBUTES

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

STANDARDS

57       towupper()
58              C11, POSIX.1-2008 (XSI).
59
60       towupper_l()
61              POSIX.1-2008.
62

HISTORY

64       towupper()
65              C99, POSIX.1-2001 (XSI).  Obsolete in POSIX.1-2008 (XSI).
66
67       towupper_l()
68              POSIX.1-2008.  glibc 2.3.
69

NOTES

71       The behavior of these functions depends on the LC_CTYPE category of the
72       locale.
73
74       These functions are not  very  appropriate  for  dealing  with  Unicode
75       characters,  because Unicode knows about three cases: upper, lower, and
76       title case.
77

SEE ALSO

79       iswupper(3), towctrans(3), towlower(3), locale(7)
80
81
82
83Linux man-pages 6.05              2023-07-20                       towupper(3)
Impressum