parse_url()
#
Parse a URL into its components.
Prototype
PUBLIC int parse_url(
const char *url,
char *schema,
int schema_size,
char *host,
int host_size,
char *port,
int port_size,
char *path,
int path_size
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
The URL to parse. |
|
|
Buffer to store the URL schema. |
|
|
The size of the schema buffer. |
|
|
Buffer to store the URL host. |
|
|
The size of the host buffer. |
|
|
Buffer to store the URL port. |
|
|
The size of the port buffer. |
|
|
Buffer to store the URL path. |
|
|
The size of the path buffer. |
Return Value
Returns 0
on success, or a negative value on failure.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples