Skip to content

Commit

Permalink
Add doc comment for extra::url::query_to_str
Browse files Browse the repository at this point in the history
  • Loading branch information
dhodder committed Nov 17, 2013
1 parent 5208332 commit 48f76a0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/libextra/url.rs
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

5 comments on commit 48f76a0

@bors
Copy link
Contributor

@bors bors commented on 48f76a0 Nov 17, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 48f76a0 Nov 17, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging dhodder/rust/master = 48f76a0 into auto

@bors
Copy link
Contributor

@bors bors commented on 48f76a0 Nov 17, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dhodder/rust/master = 48f76a0 merged ok, testing candidate = 2c9e56f

@bors
Copy link
Contributor

@bors bors commented on 48f76a0 Nov 18, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 48f76a0 Nov 18, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 2c9e56f

Please sign in to comment.