|  | libwebsockets
    Lightweight C library for HTML5 websockets | 
| Functions | |
| LWS_VISIBLE LWS_EXTERN const char * | lws_urlencode (char *escaped, const char *string, int len) | 
| LWS_VISIBLE LWS_EXTERN int | lws_urldecode (char *string, const char *escaped, int len) | 
APIs for receiving chunks of text, replacing a set of variable names via a callback, and then prepending and appending HTML chunked encoding headers.
| LWS_VISIBLE LWS_EXTERN int lws_urldecode | ( | char * | string, | 
| const char * | escaped, | ||
| int | len | ||
| ) | 
#include <lib/libwebsockets.h>
lws_urldecode() - like strncpy but with urldecoding
| string | output buffer | 
| escaped | input buffer ('\0' terminated) | 
| len | output buffer max length | 
This is only useful for '\0' terminated strings
Since urldecoding only shrinks the output string, it is possible to do it in-place, ie, string == escaped
Returns 0 if completed OK or nonzero for urldecode violation (non-hex chars where hex required, etc)
| LWS_VISIBLE LWS_EXTERN const char* lws_urlencode | ( | char * | escaped, | 
| const char * | string, | ||
| int | len | ||
| ) | 
#include <lib/libwebsockets.h>
lws_urlencode() - like strncpy but with urlencoding
| escaped | output buffer | 
| string | input buffer ('/0' terminated) | 
| len | output buffer max length | 
Because urlencoding expands the output string, it's not possible to do it in-place, ie, with escaped == string