Skip to content

Commit

Permalink
added example in README
Browse files Browse the repository at this point in the history
  • Loading branch information
bt committed Sep 15, 2016
1 parent 3517a57 commit a56e96e
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
# urlencoding

[![Latest Version](https://img.shields.io/crates/v/urlencoding.svg)](https://crates.io/crates/urlencoding)

A Rust library for doing URL percentage encoding.

Installation
============

This crate can be downloaded through Cargo. To do so, add the following line to your `Cargo.toml` file, under `dependencies`:

```toml
urlencoding = "0.1"
```

Usage
=====

To encode a string, do the following:

```rust
extern crate urlencoding;

use urlencoding::UrlEncoder;

fn main() {
let encoder = UrlEncoder::new();

let encoded = encoder.encode("This string will be URL encoded.");
// This%20string%20will%20be%20URL%20encoded.
}
```

Decoding is pending implementation.

0 comments on commit a56e96e

Please sign in to comment.