difference-rs 3.0.0

A Rust text diffing and assertion library.
Documentation

difference_rs

License:MIT Build Status Coverage Status

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())
]);

Usage

Add the following to your Cargo.toml:

[dependencies]
difference_rs = "3.0"

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