Name
tolower
Synopsis
Converts an uppercase alphabetic character to lowercase
#include <ctype.h> inttolower( intc);
The tolower() function
returns the lowercase letter corresponding to the character value of
its argument c. If
c is not an uppercase letter, or if there
is no lowercase letter which corresponds to it, its value is
returned unchanged.
Tip
Which characters are considered uppercase, and which of
those have a corresponding lowercase character, depends on the
current locale setting for the localization category LC_CTYPE, which you can query or change
using the setlocale() function.
The uppercase characters are those for which isupper() returns true; the lowercase
characters are those for which islower() returns true.
Accented characters, umlauts, and the like are considered alphabetic only in certain locales. Moreover, other locales may have characters that are alphabetic, but are neither upper- nor lowercase, or both upper- and lowercase.
Example
See the examples at getchar() and setlocale() in this
chapter.
See Also
islower(), toupper(), isupper(), towupper(), towlower(), towctrans()
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access