Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
horspool_example.cc File Reference

Illustrative example for Boyer-Moore-Horspool matching. More...

#include <iostream>
#include <string>
#include <String_Search.H>
Include dependency graph for horspool_example.cc:

Go to the source code of this file.

Functions

int main ()
 Demonstrates usage of the Boyer–Moore–Horspool string search.
 

Detailed Description

Illustrative example for Boyer-Moore-Horspool matching.

Definition in file horspool_example.cc.

Function Documentation

◆ main()

int main ( )

Demonstrates usage of the Boyer–Moore–Horspool string search.

Runs a small example that searches a hard-coded text for a hard-coded pattern using boyer_moore_horspool_search and prints the text, pattern, and the starting indices of all matches to standard output.

Returns
int Exit code (0 indicates successful execution).

Definition at line 53 of file horspool_example.cc.

References Aleph::boyer_moore_horspool_search(), and Aleph::divide_and_conquer_partition_dp().