tolower, _tolower, towlower, _tolower_l, _towlower_l
Convert character to lowercase.
int tolower( int c ); int _tolower( int c ); int towlower( wint_t c ); int _tolower_l( int c, _locale_t locale ); int _towlower_l( wint_t c, _locale_t locale );
Parameters
- c
-
Character to convert.
- locale
-
Locale to use for locale-specific translation.
Each of these routines converts a given uppercase letter to a lowercase letter if possible and appropriate. The case conversion of towlower is locale-specific. Only the characters relevant to the current locale are changed in case. The functions without the _l suffix use the currently set locale. The versions of these functions with the _l suffix take the locale as a parameter and use that instead of the currently set locale.
In order for tolower to give the expected results, __isascii and isupper must both return nonzero.
| TCHAR.H routine | _UNICODE & _MBCS not defined | _MBCS defined | _UNICODE defined |
|---|---|---|---|
| _totlower | tolower | _mbctolower | towlower |
| _totlower_l | _tolower_l | _mbctolower_l | _towlower_l |
Note |
|---|
| _tolower_l and _tolowper_l have no locale dependence and are not meant to be called directly. They are provided for internal use by _totlower_l. |
| Routine | Required header | Compatibility |
|---|---|---|
| tolower | <ctype.h> | ANSI, Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 |
| _tolower | <ctype.h> | Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 |
| towlower | <ctype.h> or <wchar.h> | Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 |
For additional compatibility information, see Compatibility in the Introduction.
See the example in to Functions.
Note