Crates.io | side-by-side-diff |
lib.rs | side-by-side-diff |
version | 0.1.2 |
source | src |
created_at | 2023-02-18 10:56:43.199832 |
updated_at | 2023-02-18 14:30:57.164275 |
description | Create side-by-side diff text. |
homepage | https://github.com/tadashi-aikawa/side-by-side-diff |
repository | https://github.com/tadashi-aikawa/side-by-side-diff |
max_upload_size | |
id | 788131 |
size | 7,805 |
The side-by-side-diff
crate is a wrapper of Similar. The side-by-side-diff
creates side-by-side diff text from two texts.
use side_by_side_diff::create_side_by_side_diff;
fn main() {
let diff = create_side_by_side_diff("aaa\niii\nuuu", "aaa\nii\nuuu", 20);
println!("{diff}");
}
$ cargo run
1 | aaa | 1 | aaa |
2 | iii | | |
| | 2 | ii |
3 | uuu | 3 | uuu |