tolower, _tolower, towlower, _tolower_l, _towlower_l

 

For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.

Converts a 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

[in] c
Character to convert.

[in] locale
Locale to use for locale-specific translation.

Each of these routines converts a copy of c to lower case if the conversion is possible, and returns the result. There is no return value reserved to indicate an error.

Each of these routines converts a given uppercase letter to a lowercase letter if it is possible and relevant. 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 that have the _l suffix take the locale as a parameter and use that instead of the currently set locale. For more information, see Locale.

In order for _tolower to give the expected results, __isascii and isupper must both return nonzero.

Generic-Text Routine Mappings

TCHAR.H routine_UNICODE & _MBCS not defined_MBCS defined_UNICODE defined
_totlowertolower_mbctolowertowlower
_totlower_l_tolower_l_mbctolower_l_towlower_l
System_CAPS_ICON_note.jpg Note

_tolower_l and _towlower_l have no locale dependence and are not meant to be called directly. They are provided for internal use by _totlower_l.

RoutineRequired header
tolower<ctype.h>
_tolower<ctype.h>
towlower<ctype.h> or <wchar.h>

For additional compatibility information, see Compatibility in the Introduction.

See the example in to Functions.

System::Char::ToLower

Data Conversion
is, isw Routines
to Functions
Locale
Interpretation of Multibyte-Character Sequences

Show: