Debian Codegraph @

upstream/debian-unstable/man3/towlower.3

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