pub fn new(pattern: TextSlice<'a>) -> Self {
        let m = pattern.len();
        let lps = lps(pattern);

        KMP { lps, m, pattern }
    }
/// Create a new instance for a given pattern.
Create a new instance for a given pattern.
Create a new instance for a given pattern .
pub fn new(pattern: TextSlice<'a>) -> Self {
        let m = pattern.len();
        let lps = lps(pattern);
        KMP { lps, m, pattern }
    }
pub fn new ( pattern : TextSlice < ' a > ) -> Self { let m = pattern . len ( ) ; let lps = lps ( pattern ) ; KMP { lps , m , pattern } }
Create a new instance for a given pattern.
Create a new instance for a given pattern .
pattern
TextSlice<'a>
pattern
TextSlice<'a>