tolower


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



C(c) In a Nutshell
C in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596006977
EAN: 2147483647
Year: 2006
Pages: 473

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net