Sample Code:
#include <algorithm>
#include <cctype>
#include <string>#include <algorithm>
using namespace std;
// Convert string to lower case
string strTest = "I am a STL string";
transform(
strTest.begin(), strTest.end(),
strTest.begin(),
tolower); // toupper for upper case
// Convert wstring to upper case
wstring wstrTest = L"I am a STL wstring";
transform(
wstrTest.begin(), wstrTest.end(),
wstrTest.begin(),
towupper); // towlower for lower case
wstrTest.begin(), wstrTest.end(),
wstrTest.begin(),
towupper); // towlower for lower case
Reference in MSDN: