diff --git a/src/libextra/url.rs b/src/libextra/url.rs index 7570d26901c..1223f3290c3 100644 --- a/src/libextra/url.rs +++ b/src/libextra/url.rs @@ -364,6 +364,16 @@ fn query_from_str(rawquery: &str) -> Query { return query; } +/** + * Converts an instance of a URI `Query` type to a string. + * + * # Example + * + * ```rust + * let query = ~[(~"title", ~"The Village"), (~"north", ~"52.91"), (~"west", ~"4.10")]; + * println(query_to_str(&query)); // title=The%20Village&north=52.91&west=4.10 + * ``` + */ pub fn query_to_str(query: &Query) -> ~str { let mut strvec = ~[]; for kv in query.iter() {