Name: Anonymous 2009-07-13 13:47
Write a routine which makes string uppercase or lowercase in language of your choice in least possible execution time.
void mkUpper (char* s)
{
while (*s)
{
if ((*s >= 97) && (*s <= 122))
*s &= ~(32);
}
}
void mkLower (char* s)
{
while (*s)
{
if ((*s >= 65) && (*s <= 90))
*s |= 32;
}
}