]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/towlower.3
man3/t-v.3: srcfix: Use a single-font-style macro for a single argument
[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.\"
89e3ffe9 4.\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA)
fea681da
MK
5.\" This is free documentation; you can redistribute it and/or
6.\" modify it under the terms of the GNU General Public License as
7.\" published by the Free Software Foundation; either version 2 of
8.\" the License, or (at your option) any later version.
fe382ebf 9.\" %%%LICENSE_END
fea681da
MK
10.\"
11.\" References consulted:
12.\" GNU glibc-2 source code and manual
13.\" Dinkumware C library reference http://www.dinkumware.com/
008f1ecc 14.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
fea681da
MK
15.\" ISO/IEC 9899:1999
16.\"
4b8c67d9 17.TH TOWLOWER 3 2017-09-15 "GNU" "Linux Programmer's Manual"
fea681da 18.SH NAME
d0f02849 19towlower, towlower_l \- convert a wide character to lowercase
fea681da
MK
20.SH SYNOPSIS
21.nf
22.B #include <wctype.h>
68e4db0a 23.PP
fea681da 24.BI "wint_t towlower(wint_t " wc );
dbfe9c70 25.PP
d0f02849 26.BI "wint_t towlower_l(wint_t " wc ", locale_t " locale );
fea681da 27.fi
68e4db0a 28.PP
d0f02849
MK
29.in -4n
30Feature Test Macro Requirements for glibc (see
31.BR feature_test_macros (7)):
32.in
68e4db0a 33.PP
d0f02849
MK
34.BR towlower_l ():
35.PD 0
36.RS 4
37.TP
38Since glibc 2.10:
39_XOPEN_SOURCE\ >=\ 700
40.TP
41Before glibc 2.10:
42_GNU_SOURCE
43.RE
44.PD
fea681da 45.SH DESCRIPTION
60a90ecd
MK
46The
47.BR towlower ()
48function is the wide-character equivalent of the
49.BR tolower (3)
50function.
35cfd378
MK
51If
52.I wc
04b5684a
MK
53is an uppercase wide character,
54and there exists a lowercase equivalent in the current locale,
55it returns the lowercase equivalent of
56.IR wc .
57In all other cases,
58.I wc
59is returned unchanged.
847e0d88 60.PP
d0f02849 61The
afdd425e 62.BR towlower_l ()
d0f02849
MK
63function performs the same task,
64but performs the conversion based on the character type information in
65the locale specified by
66.IR locale .
67The behavior of
afdd425e 68.BR towlower_l ()
d0f02849
MK
69is undefined if
70.I locale
71is the special locale object
d8a86e74 72.B LC_GLOBAL_LOCALE
d0f02849
MK
73(see
74.BR duplocale (3))
75or is not a valid locale object handle.
847e0d88 76.PP
04b5684a 77The argument
35cfd378 78.I wc
04b5684a 79must be representable as a
d8a86e74 80.I wchar_t
d0f02849 81and be a valid character in the locale or be the value
35cfd378 82.BR WEOF .
04b5684a
MK
83.SH RETURN VALUE
84If
85.I wc
86was convertible to lowercase,
87.BR towlower ()
88returns its lowercase equivalent;
89otherwise it returns
90.IR wc .
909eb7e9
MK
91.SH VERSIONS
92The
93.BR towlower_l ()
94function first appeared in glibc 2.3.
1c9b2a60 95.SH ATTRIBUTES
6e8ec3fe
PH
96For an explanation of the terms used in this section, see
97.BR attributes (7).
98.TS
99allbox;
100lb lb lb
101l l l.
102Interface Attribute Value
103T{
1c9b2a60 104.BR towlower ()
6e8ec3fe
PH
105T} Thread safety MT-Safe locale
106T{
107.BR towlower_l ()
108T} Thread safety MT-Safe
109.TE
47297adb 110.SH CONFORMING TO
d0f02849
MK
111.BR towlower ():
112C99, POSIX.1-2001 (XSI);
113present as an XSI extension in POSIX.1-2008, but marked obsolete.
847e0d88 114.PP
d0f02849
MK
115.BR towlower_l ():
116POSIX.1-2008.
fea681da 117.SH NOTES
d0f02849 118The behavior of these functions depends on the
1274071a 119.B LC_CTYPE
d0f02849 120category of the locale.
fea681da 121.PP
d0f02849 122These functions are not very appropriate for dealing with Unicode characters,
fea681da 123because Unicode knows about three cases: upper, lower and title case.
47297adb 124.SH SEE ALSO
e37e3282
MK
125.BR iswlower (3),
126.BR towctrans (3),
d0f02849
MK
127.BR towupper (3),
128.BR locale (7)