Crate urlparse [−] [src]
This is a URL parsing library.
The goal of this project is to provide simple parsing URL library like urllib.parse in Python3.x.
Examples
use urlparse::urlparse; use urlparse::GetQuery; // Trait let url = urlparse("http://www.example.com/foo?bar=123&col=println%21%28%22TEST%21%22%29&col=sub"); let query = url.get_parsed_query().unwrap(); assert_eq!(url.scheme, "http"); assert_eq!(query.get_first_from_str("col").unwrap(), "println!(\"TEST!\")");
Structs
Url |
Traits
GetQuery |
Functions
parse_qs |
Parses a query given as a string argument. |
quote |
Replaces special characters in string using the %xx escape. Letters, digits, and the characters '_.-' are never quoted. |
quote_plus |
Like quote(), but also replaces ' ' with '+', as required for quoting HTML form values. |
unquote |
Replaces %xx escapes by their single-character equivalent. |
unquote_plus |
Like unquote(), but also replaces plus signs by spaces, as required for unquoting HTML form values. |
urlparse |
Parses a URL and returns a |
urlunparse |
Returns a URL string from a |
Type Definitions
Query |
An alias type of |
QueryValue |
An alias type of |