Hi all I'm trying to figure out how this function works, pointers give me a hard time still especially a function with several pointers as parameters.
I understand the function takes a string and if it has a % or + it removes those, I don't understand the nibble part of the function is where I'm confused. Long story short guess I just wonder if anyone could comment it so I can understand what's happening.
Code:/* Unencode a urlencoded string*/ /*----------------------------------------------------------------------------*/ static void unencode(char *dst,char *src,size_t len) { char c; while (c = *src++,len--) { if (c == '+') c = ' '; else if (c == '%') { c = *src++; c = (nibble(c) << 4) | nibble(*src++); len -= 2; } *dst++ = c; } *dst = '\0'; }



LinkBack URL
About LinkBacks



