Skip to content

Commit 2c9e56f

Browse files
committed
auto merge of #10532 : dhodder/rust/master, r=alexcrichton
Hello. This is just a tiny doc update -- I'm new here, so apologies if I'm doing it wrong.
2 parents 60ec647 + 48f76a0 commit 2c9e56f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/libextra/url.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,16 @@ fn query_from_str(rawquery: &str) -> Query {
364364
return query;
365365
}
366366

367+
/**
368+
* Converts an instance of a URI `Query` type to a string.
369+
*
370+
* # Example
371+
*
372+
* ```rust
373+
* let query = ~[(~"title", ~"The Village"), (~"north", ~"52.91"), (~"west", ~"4.10")];
374+
* println(query_to_str(&query)); // title=The%20Village&north=52.91&west=4.10
375+
* ```
376+
*/
367377
pub fn query_to_str(query: &Query) -> ~str {
368378
let mut strvec = ~[];
369379
for kv in query.iter() {

0 commit comments

Comments
 (0)