Function urlparse::parse_qs [] [src]

pub fn parse_qs<S: AsRef<str>>(s: S) -> Query

Parses a query given as a string argument.

Examples

use urlparse::parse_qs;

let map = parse_qs("a=123&a=90&a=%E4%BA%80%E4%BA%95&b=0;n1;n2");
let a = map.get(&"a".to_string()).unwrap();
let b = map.get(&"b".to_string()).unwrap();
assert_eq!(a.len(), 3);
assert_eq!(b.len(), 1);
assert_eq!(*a.get(2).unwrap(), "亀井");