sfparse_pctdecode

Synopsis

#include <sfparse.h>

void sfparse_pctdecode(sfparse_vec *dest, const sfparse_vec *src)

sfparse_pctdecode() decodes percent-encoded string src and writes the result into dest. src should be the pointer to sfparse_value.vec of type sfparse_type.SFPARSE_TYPE_DISPSTRING produced by either sfparse_parser_dict(), sfparse_parser_list(), sfparse_parser_inner_list(), sfparse_parser_item(), or sfparse_parser_param(), otherwise the behavior is undefined.

dest->base must point to the buffer that has sufficient space to store the decoded byte string. The memory areas pointed by dest->base and src->base must not overlap.

This function sets the length of decoded byte string to dest->len.