Text-search algorithms implementation and tests.