Late to the party, but here is a variant that uses std::locale, and thus correctly handles Turkish:
auto tolower = std::bind1st(
std::mem_fun(
&std::ctype::tolower),
&std::use_facet >(
std::locale()));
gives you a functor that uses the active locale to convert characters to lowercase, which you can then use via std::transform to generate lower-case strings:
std::string left = "fOo";
transform(left.begin(), left.end(), left.begin(), tolower);
This also works for wchar_t based strings.