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