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

#4 in #diffs

Download history 39/week @ 2023-12-04 47/week @ 2023-12-11 23/week @ 2023-12-18 23/week @ 2023-12-25 21/week @ 2024-01-01 80/week @ 2024-01-08 36/week @ 2024-01-15 37/week @ 2024-01-22 22/week @ 2024-01-29 47/week @ 2024-02-05 48/week @ 2024-02-12 113/week @ 2024-02-19 83/week @ 2024-02-26 60/week @ 2024-03-04 96/week @ 2024-03-11 65/week @ 2024-03-18

308 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