difference_rs

A Rust, updated, text diffing library with built-in diffing assertion.
Examples
use difference_rs::Changeset;
let changeset = Changeset::new("test", "tent", "");
assert_eq!(changeset.diffs, vec![
Difference::Same("te".to_string()),
Difference::Rem("s".to_string()),
Difference::Add("n".to_string()),
Difference::Same("t".to_string())
]);

use difference_rs::{Changeset, Difference};
let changeset = Changeset::new_multi(
"https://localhost:8080/path?query=value",
"https://myapi.com/api/path?query=asset",
&["://", "/", "?", "="],
);
assert_eq!(changeset.diffs, vec![
Difference::Same("https://".to_string()),
Difference::Rem("localhost:8080/".to_string()),
Difference::Add("myapi.com/api/".to_string()),
Difference::Same("path?query=".to_string()),
Difference::Rem("value".to_string()),
Difference::Add("asset".to_string()),
]);

Usage
Add the following to your Cargo.toml:
[dependencies]
difference_rs = "3.1"
Now you can use the crate in your code
Using the binary
difference_rs can also be used as a command-line application. The best way to install it is using:
$ cargo install --features=bin