3 unstable releases

Uses old Rust 2015

0.2.0 Sep 25, 2015
0.1.1 Sep 22, 2015
0.1.0 Sep 22, 2015

#6 in #diffs

Download history 84/week @ 2024-07-22 59/week @ 2024-07-29 46/week @ 2024-08-05 107/week @ 2024-08-12 127/week @ 2024-08-19 76/week @ 2024-08-26 81/week @ 2024-09-02 78/week @ 2024-09-09 98/week @ 2024-09-16 74/week @ 2024-09-23 27/week @ 2024-09-30 21/week @ 2024-10-07 32/week @ 2024-10-14 54/week @ 2024-10-21 23/week @ 2024-10-28 63/week @ 2024-11-04

174 downloads per month
Used in 2 crates

MIT license

10KB
168 lines

lcs

A library for finding longest common substrings. You can also use this library to calculate a diff between two sequences.

Example

extern crate lcs;

let a: Vec<_> = "a--b---c".chars().collect();
let b: Vec<_> = "abc".chars().collect();

let table = lcs::LcsTable::new(&a, &b);
let lcs = table.longest_common_subsequence();

assert_eq!(vec![&'a', &'b', &'c'], lcs);

Documentation

crates.io


lib.rs:

This crate provides utilities around least common subsequences. From a least common subsequences table, you can also calculate diffs (see LcsTable::diff).

Usage of this crate is centered around LcsTable, so most interesting documentation can be found there.

No runtime deps