3 ms·
>Why have a dedicated function for 2 lines of code? Then why does std::max() exist? >People will use the generalized tolower for UTF8 encoded in narrow string
by fluoridation 2y ago
>Why have a dedicated function for 2 lines of code?
Then why does std::max() exist?
>People will use the generalized tolower for UTF8 encoded in narrow strings and have issues.
tolower() and toupper() work correctly on UTF-8 strings, because UTF-8 was specifically designed so that non-ASCII characters were represented by sequences of purely non-ASCII bytes.
>Generalized string conversion is a very complex
Hence why people who say C++ should have a tolower() that operates on strings are not asking more complex Unicode support.