MCPcopy Create free account
hub / github.com/douchuan/algorithm / kmp

Function kmp

tests/test_strings.rs:353–359  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

351
352#[test]
353fn kmp() {
354 let data = substr_data();
355 for (pat, txt, pos) in data {
356 let kmp = KMP::from(pat);
357 assert_eq!(pos, kmp.search(txt));
358 }
359}
360
361#[test]
362fn palindrome() {

Callers

nothing calls this directly

Calls 1

substr_dataFunction · 0.85

Tested by

no test coverage detected