std::tolower (3) - Linux Man Pages
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.
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
Lowercase version of ch or unmodified ch if no lowercase version is listed in the current C locale.
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:
// Run this code