Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Homework

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.

Name: " 2009-07-13 14:34

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;
    }
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List