likewise/examples/original-slices.rs
Armin Ronacher 777105fbb0
Added slice remapper and improved documentation (#8)
* 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
2021-02-06 21:41:49 +01:00

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);
}
}