String pattern matching algorithms are very useful for several purposes, like simple
search for a pattern in a text or looking for attacks with predefined signatures.
We will implement a dictionary-matching algorithm that locates elements of a finite
set of strings (the "dictionary") within an input text. It matches all patterns "at once",
so the complexity of the algorithm is linear in the length of the patterns plus the length
of the searched text plus the number of output matches.
Since all matches are found, there can be a quadratic number of matches if every
substring matches (e.g. dictionary = a, aa, aaa, aaaa and input string is aaaa).