// Note: isalpha(int c), toupper(int c), tolower(int c), isspace(int c)
// If c is not an unsigned char value, or EOF, the behaviour of these functions
// is undefined.
csStringBase& csStringBase::Downcase()
{
char* p = GetDataMutable();
if (p != 0)
{
char const* const pN = p + Length();
for ( ; p < pN; p++)
if (isalpha((unsigned char)(*p)))
*p = (char)tolower((unsigned char)(*p));
}
return *this;
}
// Note: isalpha(int c), toupper(int c), tolower(int c), isspace(int c)
// If c is not an unsigned char value, or EOF, the behaviour of these functions
// is undefined.
csStringBase& csStringBase::Upcase()
{
char* p = GetDataMutable();
if (p != 0)
{
char const* const pN = p + Length();
for ( ; p < pN; p++)
if (isalpha((unsigned char)(*p)))
*p = (char)toupper((unsigned char)(*p));
}
return *this;
}