difference.rs

A Rust text diffing library with built-in diffing assertion.

Documentation

Examples

```rust let (dist, changeset) = diff("test", "tent", "");

asserteq!(changeset, vec![ Difference::Same("te".tostring()), Difference::Rem("s".tostring()), Difference::Add("n".tostring()), Difference::Same("t".to_string()) ]); ```

Usage

Add the following to your Cargo.toml:

toml [dependencies] difference = "0.4"

Now you can use the crate in your code rust extern crate difference;

Using the binary

difference can also be used as a command-line application. The best way to install it is using rustle:

curl -sf https://raw.githubusercontent.com/brson/rustle/master/rustle.sh | sh -s -- https://github.com/johannhof/difference.rs