pub fn kmp_search(text: &str, pattern: &str) -> Result<Vec<usize>, Error>
Knuth-Morris-Pratt pattern matching.