CURI  0.1
A tiny URI parser written in C
Functions
URL decoding

Decoding percent encoded strings. More...

Functions

curi_status curi_url_decode_nt (const char *input, char *output, size_t outputCapacity, size_t *outputLen)
 URL Decode the given string. More...
 
curi_status curi_url_decode (const char *input, size_t inputLen, char *output, size_t outputCapacity, size_t *outputLen)
 URL Decode the given string. More...
 

Detailed Description

Decoding percent encoded strings.

Function Documentation

curi_status curi_url_decode ( const char *  input,
size_t  inputLen,
char *  output,
size_t  outputCapacity,
size_t *  outputLen 
)

URL Decode the given string.

  • Percent decoding of ascii characters (from %00 to %1F) are supported
  • as well as '+' standing for a space.
Note
In practice the parsing ends once the given length is reached or a NULL-character ('\0') is read, making this function working for NULL-terminated string as well.
curi_status curi_url_decode_nt ( const char *  input,
char *  output,
size_t  outputCapacity,
size_t *  outputLen 
)

URL Decode the given string.

  • Percent decoding of ascii characters (from %00 to %1F) are supported
  • as well as '+' standing for a space.
Note
This function doesn't do compute strlen(input), it calls curi_url_decode with a length set to SIZE_MAX.