summaryrefslogtreecommitdiffstats
path: root/vendor/similar/examples/original-slices.rs
blob: bdca420e5bd64c7d1de13ab22c54d13ab6df4419 (plain)
1
2
3
4
5
6
7
8
9
10
11
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);
    }
}