Add doc comment for extra::url::query_to_str

This commit is contained in:
Dave Hodder 2013-11-17 16:52:14 +00:00
parent 5208332a1a
commit 48f76a0577

View File

@ -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() {