As seen on the internet

void URLDecoder::getAsDec(char* hex) {
    char tmp = tolower(hex[0]);
    if(tmp == 'a') {
        strcpy(hex,"10");
    }else if(tmp == 'b') {
        strcpy(hex,"11");
    }else if(tmp == 'c') {
        strcpy(hex,"12");
    }else if(tmp == 'd') {
        strcpy(hex,"13");
    }else if(tmp == 'e') {
        strcpy(hex,"14");
    }else if(tmp == 'f') {
        strcpy(hex,"15");
    }else if(tmp == 'g') {
        strcpy(hex,"16");
    }
} 
I am not making this up.

Entry first conceived on 19 November 2007, 16:38 UTC, last modified on 15 January 2012, 3:46 UTC
Website Copyright © 2004-2024 Jeff Epler