Show / Hide Table of Contents

    Class KMP

    Knuth–Morris–Pratt(KMP) string search implementation.

    Inheritance
    Object
    KMP
    Namespace: Advanced.Algorithms.String
    Assembly: Advanced.Algorithms.dll
    Syntax
    public class KMP : object

    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
    Back to top Generated by DocFX