String searching
[orgmode source] Table of Contents 1. String Search 1.1. Naive string search 1.1.1. Complexity 1.2. Boyer-Moore-Horspool Search Algorithm 1.2.1. Complexity 1. String Search We define a function that takes in a pattern to search for and the string to search and returns a list of all found matches. Each match is in the form of a tuple of the index in the string at which the pattern was found, and the length of the substring matching the pattern.
Read more...