Civetweb API Reference

mg_url_encode( src, dst, des_len );

Parameters

ParameterTypeDescription
srcconst char *Input string to encode
dstchar *Destination buffer to store the encoded result
dst_lensize_tLength of the destination buffer including the terminating NUL

Return Value

TypeDescription
intThe number of characters written in the destination buffer

Description

The function mg_url_encode() encodes a in input buffer. Both normal URIs and form URIs can be encoded. In the latter case the space character is converted to a + as defined in RFC 1866 in section 8.2.1.

See Also