diff options
| author | Dave Hodder <dmh@dmh.org.uk> | 2013-11-17 16:52:14 +0000 |
|---|---|---|
| committer | Dave Hodder <dmh@dmh.org.uk> | 2013-11-17 16:52:14 +0000 |
| commit | 48f76a057774871743ff88fc951e89c1a04ccfda (patch) | |
| tree | 43b4a44c40923819521782b3cb14b48e4a814e00 | |
| parent | 5208332a1a0cc2d07d52c117a6abe7e2c8c1f36e (diff) | |
| download | rust-48f76a057774871743ff88fc951e89c1a04ccfda.tar.gz rust-48f76a057774871743ff88fc951e89c1a04ccfda.zip | |
Add doc comment for extra::url::query_to_str
| -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() { |
