String Meter: Fixed capitalization problem when letter followed whitespace that was not a space.

This commit is contained in:
Brian Ferguson 2013-04-18 11:19:21 -06:00
parent 05c6ce1ce7
commit 8b477d1a9b

View File

@ -54,7 +54,7 @@ void StringToProper(std::wstring& str)
for (size_t i = 1; i < str.length(); ++i)
{
srcAndDest = &str[i];
LCMapString(LOCALE_USER_DEFAULT, (str[i - 1] == L' ') ? LCMAP_UPPERCASE : LCMAP_LOWERCASE, srcAndDest, 1, srcAndDest, 1);
LCMapString(LOCALE_USER_DEFAULT, (iswspace(str[i - 1]) > 0) ? LCMAP_UPPERCASE : LCMAP_LOWERCASE, srcAndDest, 1, srcAndDest, 1);
}
}
}