Skip to content

oleksii-mdr/StringSearch

Repository files navigation

Description

This project provides C# implementation of Rabin-Karp multi pattern string search algorithm.

I also hope to add more samples for string search in future (we all have plans... sigh)

Usage

string input = "test 123string456 my foo bar";

IMultiPatternSearch searcher = new RabinKarpSearch();
searcher.Init(new List<string> { "string", "foo" });

var matches = uut.FindAll(input);

foreach(var match in matches)
{
	Console.WriteLine("Start position: " + match.Item1);
	Console.WriteLine("Pattern string: " + match.Item2);
}

See tests for more examples

Want to contribute?

You are welcome to contribute, feel free to make a pull request.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages