Previous Page
Next Page

tolower

Converts an uppercase alphabetic character to lowercase

#include <ctype.h>
int tolower ( int c  );

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.

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( )


Previous Page
Next Page