Class SearchPattern

java.lang.Object
org.eclipse.jetty.util.SearchPattern

public class SearchPattern extends Object

Fast search for patterns within strings, arrays of bytes and ByteBuffers.

Uses an implementation of the Boyer–Moore–Horspool algorithm with a 256 character alphabet.

The algorithm has an average-case complexity of O(n) on random text and O(nm) in the worst case, where m = pattern length and n = length of data to search.