Skip to content

Commit

Permalink
auto merge of #10532 : dhodder/rust/master, r=alexcrichton
Browse files Browse the repository at this point in the history
Hello.  This is just a tiny doc update -- I'm new here, so apologies if I'm doing it wrong.
  • Loading branch information
bors committed Nov 17, 2013
2 parents 60ec647 + 48f76a0 commit 2c9e56f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/libextra/url.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 2c9e56f

Please sign in to comment.