3 ms·
Not quite. islower is actually supposed to account for the user's "locale", which includes their language. The key takeway is that lowercasing a string needs
by thayne 2y ago
Not quite.
islower is actually supposed to account for the user's "locale", which includes their language.
The key takeway is that lowercasing a string needs to be done on the whole string, not individual characters, even if std::string had a way to iterate over codepoints instead of bytes (or code units, in the case of wstring).
And there isn't a standard way to do that, you either meed to use a platform specific API, like the windows function mentioned, or use a library like ICU.