Struct librualg::string::Lcp [−][src]
pub struct Lcp<'a> { /* fields omitted */ }
Expand description
Longest Common Prefix
use librualg::string::{Lcp, suffix_array}; let (p, c) = suffix_array("ababba$"); let data = Lcp::build(&p, &c, "ababba$"); assert_eq!(data.lcp(0, 5), Some(1)); assert_eq!(data.lcp(1, 4), Some(2));