Possible Duplicate:
Convert first letter in string to uppercase
How do I convert a string to title case in C++ "hello world" to "Hello World" . The string can even have multibyte characters
Possible Duplicate:
Convert first letter in string to uppercase
How do I convert a string to title case in C++ "hello world" to "Hello World" . The string can even have multibyte characters
Well, if you follow the advice on your previous question, Convert first letter in string to uppercase, all you need to do is split the string into one word each, and uppercase it.
std::wstring s = L"iron maiden";
if(s.length() > 0)
s[0] = toupper(s[0]);
for(std::wstring::iterator it = s.begin() + 1; it != s.end(); ++it)
{
if(!isalpha(*(it - 1)) &&
islower(*it))
{
*it = toupper(*it);
}
}
Basically, you just have to write/use a parser.