std::tolower (3) - Linux Manuals
std::tolower: std::tolower
NAME
Synopsis
Defined in header <cctype>
int tolower( int ch );
Converts the given character to lowercase according to the character conversion rules defined by the currently installed C locale.
In the default "C" locale, the following uppercase letters ABCDEFGHIJKLMNOPQRSTUVWXYZ are replaced with respective lowercase letters abcdefghijklmnopqrstuvwxyz.
Parameters
ch - character to be converted. If the value of ch is not representable as unsigned char and does not equal EOF, the behavior is undefined
Return value
Lowercase version of ch or unmodified ch if no lowercase version is listed in the current C locale.
Notes
Like all other functions from <cctype>, the behavior of std::tolower is undefined if the argument's value is neither representable as unsigned char nor equal to EOF. To use these functions safely with plain chars (or signed chars), the argument should first be converted to unsigned char:
Similarly, they should not be directly used with standard algorithms when the iterator's value type is char or signed char. Instead, convert the value to unsigned char first:
Example
// Run this code
Output:
See also
toupper (function)