diff options
| author | bors <bors@rust-lang.org> | 2013-11-17 15:11:41 -0800 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-11-17 15:11:41 -0800 |
| commit | 2c9e56f0ed96a7ebc9d6a854f64397f715069feb (patch) | |
| tree | c313016e7a42794ed05837936c1394f7db373611 | |
| parent | 60ec647b770874d7be69e5b37b41769042f76933 (diff) | |
| parent | 48f76a057774871743ff88fc951e89c1a04ccfda (diff) | |
| download | rust-2c9e56f0ed96a7ebc9d6a854f64397f715069feb.tar.gz rust-2c9e56f0ed96a7ebc9d6a854f64397f715069feb.zip | |
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.
| -rw-r--r-- | src/libextra/url.rs | 10 |
1 files changed, 10 insertions, 0 deletions
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() { |
