Class KMP
Knuth–Morris–Pratt(KMP) string search implementation.
Inherited Members
Namespace: Advanced.Algorithms.String
Assembly: Advanced.Algorithms.dll
Syntax
public class KMP
Methods
Search(String, String)
Returns the start index of first appearance of pattern in input string. Returns -1 if no match.
Declaration
public int Search(string input, string pattern)
Parameters
| Type | Name | Description |
|---|---|---|
| String | input | |
| String | pattern |
Returns
| Type | Description |
|---|---|
| Int32 |