| iMatix home page | << | < | > | >> |
SFL Version 2.11 |
#include "sflhttp.h" char * http_unescape_hex ( char *string, char *result)
Removes HTTP hex escaping from a URL string, by expanding any sequences of characters %xx.
{ char *target; /* Where we store the result */ ASSERT (string); if (!result) /* If result string is null, */ result = string; /* modify in place */ target = result; while (*string) { if (*string == '%' /* Unescape %xx sequence */ && string [1] && string [2]) { string++; *target = decode_hex ((const char **) &string, 2); target++; } else { *target++ = *string; /* Otherwise just copy */ string++; } } *target = '\0'; /* Terminate target string */ return (result); }
| << | < | > | >> | Copyright © 1996-2000 iMatix Corporation |