Is there an inbuilt function to convert C++ string from upper case letters to lowercase letters ? If not converting it to cstring and using tolower on each char is the only
If boost is an option:
boost
#include std::string str = "wHatEver"; boost::to_lower(str);
Otherwise, you may use std::transform:
std::transform
std::string str = "wHatEver"; std::transform(str.begin(), str.end(), str.begin(), ::tolower);
You can also use another function if you have some custom locale-aware tolower.
tolower