Given string foo, I\'ve written answers on how to use cctype\'s tolower to convert the characters to lowercase
transform(cbegin(foo
Unfortunately,both are equally bad. Although std::string pretends to be a utf-8 encoded string, non of the methods/function (including tolower), are really utf-8 aware. So, tolower / tolower + locale may work with characters which are single byte (= ASCII), they will fail for every other set of languages.
On Linux, I'd use ICU library. On Windows, I'd use CharUpper function.