Tor  0.4.7.0-alpha-dev
Functions
qstring.h File Reference

Header for qstring.c. More...

#include <stddef.h>

Go to the source code of this file.

Functions

const char * decode_qstring (const char *start, size_t in_len_max, char **out, size_t *out_len)
 

Detailed Description

Header for qstring.c.

Definition in file qstring.h.

Function Documentation

◆ decode_qstring()

const char* decode_qstring ( const char *  start,
size_t  in_len_max,
char **  out,
size_t *  out_len 
)

Given a pointer to a string starting at start containing in_len_max characters, decode a string beginning with one double quote, containing any number of non-quote characters or characters escaped with a backslash, and ending with a final double quote. Place the resulting string (unquoted, unescaped) into a newly allocated string in *out; store its length in out_len. On success, return a pointer to the character immediately following the escaped string. On failure, return NULL.

Definition at line 64 of file qstring.c.