* Experimental slice remapper * Added iter_slices to DiffOp * Improvements to the utility diff functions * Documentation improvements * More documentation updates on utils * More documentation on main text diff
11 lines
292 B
Rust
11 lines
292 B
Rust
use similar::utils::diff_chars;
|
|
use similar::Algorithm;
|
|
|
|
fn main() {
|
|
let old = "1234567890abcdef".to_string();
|
|
let new = "0123456789Oabzdef".to_string();
|
|
|
|
for (change_tag, value) in diff_chars(Algorithm::Myers, &old, &new) {
|
|
println!("{}{:?}", change_tag, value);
|
|
}
|
|
}
|