How could one convert a string to upper case. The examples I have found from googling only have to deal with chars.
Use a lambda.
std::string s("change my case"); std::locale locale; auto to_upper = [&locale] (char ch) { return std::use_facet>(locale).toupper(ch); }; std::transform(s.begin(), s.end(), s.begin(), to_upper);