towlower(3)
π towlower(3) β the wide-char lowercase glow-up π
okay bestie, so this one lives in the Library Functions Manual, and it's literally just: take a wide character, make it lowercase. that's it. that's the whole vibe. two functions, towlower and towlower_l, and they are not complicated, i promise. π¦
π LIBRARY
Standard C library (libc, -lc) β yeah girl, she's been in the group chat since forever. π
β¨ SYNOPSIS
#include <wctype.h>
wint_t towlower(wint_t wc);
wint_t towlower_l(wint_t wc, locale_t locale);
π Feature Test Macro Requirements for glibc
(if you don't know what these are, go read feature_test_macros(7), i'll wait π
)
towlower_l():
- Since glibc 2.10:
_XOPEN_SOURCE >= 700 - Before glibc 2.10:
_GNU_SOURCE
πΈ DESCRIPTION
So here's the tea. towlower() is literally the wide-character version of tolower(3) β same energy, wider chars. π
Here's exactly what she does:
- if
wcis an uppercase wide character, AND there's a lowercase equivalent in the current locale β she gives you back that lowercase equivalent - in all other cases β
wccomes right back to you, unchanged, no notes
Then there's towlower_l(), which does the exact same task but bases the conversion on the character type info in the locale you pass as locale. same job, different locale, iykyk. π§
β οΈ bestie please listen: the behavior oftowlower_l()is undefined iflocaleis the special locale objectLC_GLOBAL_LOCALE(go checkduplocale(3)) or if it's not a valid locale object handle. undefined. we don't do that. π
And about the argument wc β it must be representable as a wchar_t and be a valid character in the locale, or it can be the value WEOF. that's the rule, periodt.
π«Ά RETURN VALUE
- if
wcwas convertible to lowercase βtowlower()returns its lowercase equivalent π - otherwise β it returns
wc
π₯ ATTRIBUTES
for an explanation of the terms used in this section, see attributes(7). (the original is a whole table but we're doing bullets, slay)
towlower()β Thread safety:MT-Safe localetowlower_l()β Thread safety:MT-Safe
π STANDARDS
towlower()
C11,POSIX.1-2008 (XSI).
towlower_l()
POSIX.1-2008.
π STANDARDS (yes, again, the manpage said it twice and we respect the canon)
towlower()
C99,POSIX.1-2001 (XSI).- Obsolete in
POSIX.1-2008 (XSI). π she's a legacy queen.
towlower_l()
glibc 2.3.POSIX.1-2008.
π NOTES
- the behavior of these functions depends on the
LC_CTYPEcategory of the locale. that's the whole plot. π - real talk though: these functions are not very appropriate for dealing with Unicode characters, because Unicode knows about three cases: upper, lower, and title case. three. she can't hold all that. π
π¦ SEE ALSO
iswlower(3), towctrans(3), towupper(3), locale(7)
and that's the whole page babes β¨ this was Linux man-pages 6.20, dated 2026-02-08, brought to you by the towlower(3) girlies. go lowercase something. no cap. π
π
π¦ where this page comes from
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- π the page's license: GPL-2.0-or-later
- Copyright 2014, Michael Kerrisk <mtk.manpages@gmail.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms