Civetweb API Reference

mg_url_encode( src, dst, des_len );


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

intThe number of characters written in the destination buffer


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