How is the text search?

How to search the matched text by entering a search value and clicking the search button. I need it after every press of the search was allocated the value first the first and then each next.
as for the word incidence
July 4th 19 at 23:09
1 answer
July 4th 19 at 23:11
The simplest option is to use the prefix function (the algorithm of Knuth-Morris-Pratt). Then the search will be quite slow on large texts, but simple to implement.
You can use suffix array, then the text search will be significantly faster, but will require each time you change the text to reconstruct the suffix array. The option for optimization is to build it only if you are requesting the search, and subsequent search queries(without changing the text) to use the already constructed suffix array.
I can't understand suffix array - modesto43 commented on July 4th 19 at 23:14
and prefix functions - modesto43 commented on July 4th 19 at 23:17
: you asked how, I answered your question. The prefix-function, in fact, it is easy to understand.
If you wanted a recipe search on the text on the sharp - I think you have to wait long for the answer - heaven_Lang commented on July 4th 19 at 23:20

Find more questions by tags C#Visual Studio