[C++] Convert string To Lower or To Upper String
void ToLower(WCHAR* pStr, int nLength)
{
if (pStr)
{
for (int n = 0; n < nLength; n++)
{
if (iswupper(pStr[n]))
pStr[n] = towlower(pStr[n]);
}
}
}
void ToUpper(WCHAR* pStr, int nLength)
{
if (pStr)
{
for (int n = 0; n < nLength; n++)
{
if (iswlower(pStr[n]))
pStr[n] = towupper(pStr[n]);
}
}
}
void ToLower(char* pStr, int nLength)
{
if (pStr)
{
for (int n = 0; n < nLength; n++)
{
if (isupper(pStr[n]))
pStr[n] = tolower(pStr[n]);
}
}
}
void ToUpper(char* pStr, int nLength)
{
if (pStr)
{
for (int n = 0; n < nLength; n++)
{
if (islower(pStr[n]))
pStr[n] = toupper(pStr[n]);
}
}
}