Mstdlib-1.24.0

Typedefs

typedef struct M_url M_url_t
 

Functions

M_url_tM_url_create (const char *url_str)
 
const char * M_url_schema (M_url_t *url)
 
const char * M_url_host (M_url_t *url)
 
const char * M_url_port (M_url_t *url)
 
const char * M_url_path (M_url_t *url)
 
const char * M_url_query (M_url_t *url)
 
const char * M_url_fragment (M_url_t *url)
 
const char * M_url_userinfo (M_url_t *url)
 
M_uint16 M_url_port_u16 (M_url_t *url)
 
void M_url_destroy (M_url_t *url)
 

Detailed Description

URL Parser.

This parser supports many of the features of RFC 3986, but is not a fully compliant URI parser.

Specifically from RFC3986 section 1.1.2:

SUPPORTED?

Typedef Documentation

◆ M_url_t

typedef struct M_url M_url_t

Function Documentation

◆ M_url_create()

M_url_t * M_url_create ( const char *  url_str)

Parse URL string into structure parts.

Parameters
[in]url_strURL string to be parsed.
Returns
Parsed URL struct or NULL on error.

◆ M_url_schema()

const char * M_url_schema ( M_url_t url)

Getter function

Parameters
[in]urlparsed URL.
Returns
schema string (NULL if none)

◆ M_url_host()

const char * M_url_host ( M_url_t url)

Getter function

Parameters
[in]urlparsed URL.
Returns
host string (NULL if none)

◆ M_url_port()

const char * M_url_port ( M_url_t url)

Getter function

Parameters
[in]urlparsed URL.
Returns
port string (NULL if none)

◆ M_url_path()

const char * M_url_path ( M_url_t url)

Getter function

Parameters
[in]urlparsed URL.
Returns
path string (NULL if none)

◆ M_url_query()

const char * M_url_query ( M_url_t url)

Getter function

Parameters
[in]urlparsed URL.
Returns
query string (NULL if none)

◆ M_url_fragment()

const char * M_url_fragment ( M_url_t url)

Getter function

Parameters
[in]urlparsed URL.
Returns
fragment string (NULL if none)

◆ M_url_userinfo()

const char * M_url_userinfo ( M_url_t url)

Getter function

Parameters
[in]urlparsed URL.
Returns
userinfo string (NULL if none)

◆ M_url_port_u16()

M_uint16 M_url_port_u16 ( M_url_t url)

Getter function

Parameters
[in]urlparsed URL.
Returns
port as M_uint16 (0 if none)

◆ M_url_destroy()

void M_url_destroy ( M_url_t url)

Destroy parsed URL struct

Parameters
[in]urlstruct to destroy