Home

towlower

Towlower is a function in the C standard library used to convert a wide character to its lowercase equivalent. It operates on wide characters and is part of the wctype.h header, with related wide-character utilities commonly used alongside wchar.h for working with wchar_t strings. The function name is towlower, though some texts may spell it informally as towlower.

Prototype and behavior: The function is declared as int towlower(int wc). It takes a wide character value

Locale and portability: The results produced by towlower depend on the program’s current locale, which is set

Usage notes: Towlower is used when processing wide-character strings (for example, wchar_t arrays) or Unicode code

See also: tolower, towupper, setlocale, wctype.h, wchar.h.

(promoted
to
int,
typically
representing
a
wint_t)
and
returns
the
lowercase
mapping
of
that
character
according
to
the
current
locale.
If
there
is
no
lowercase
mapping
for
the
input,
or
if
the
input
does
not
have
a
lowercase
form,
towlower
returns
the
input
value
unchanged.
The
conversion
is
locale-dependent
and
follows
the
rules
of
the
program’s
LC_CTYPE
category.
with
setlocale.
Some
implementations
provide
a
locale-specific
variant,
such
as
towlower_l,
to
apply
a
particular
locale
directly.
Towlower
is
specified
by
the
C
standard
and
is
widely
supported
across
major
compilers
and
standard
libraries,
including
GCC,
Clang,
and
MSVC.
points
in
environments
that
represent
characters
as
wide
types.
It
is
not
designed
for
multibyte
encodings
like
UTF-8
directly.
For
narrow-character
text,
the
corresponding
function
is
tolower
from
ctype.h;
for
wide
characters,
towlower
is
the
appropriate
counterpart.