KMPM
KMPM (Knuth-Morris-Pratt algorithm) library. KMPM is one of effective character query algorithm.
If the length of the text is n and the length of the pattern is m, the KMP algorithm processes in O(n+m) time
Usage
Create new rust project,and add kmpm dependencies to Cargo.toml file.
Cargo.toml
[]
="0.2"
Code Example
main.rs
use kmpm_str;
matched index 6
========================
"hello world !"
"world"
------^^^^^
|
#6