public class BoyerMooreByteFromWikipedia extends Object
| Constructor and Description |
|---|
BoyerMooreByteFromWikipedia() |
| Modifier and Type | Method and Description |
|---|---|
static int[] |
createBadCharacterTable(byte[] pattern) |
static int[] |
createGoodSuffixTable(byte[] pattern)
Makes the jump table based on the scan offset which mismatch occurs.
|
static int |
indexOf(byte[] haystack,
byte[] needle)
Returns the index within this string of the first occurrence of the
specified substring.
|
static boolean |
isPrefix(byte[] pattern,
int p)
Is needle[p:end] a prefix of needle?
|
static int[] |
makeByteTableOld(byte[] needle)
Makes the jump table based on the mismatched character information.
|
static int[] |
makeOffsetTableFromC(byte[] needle)
Makes the jump table based on the scan offset which mismatch occurs.
|
static int |
suffixLength(byte[] needle,
int p)
Returns the maximum length of the substring ends at p and is a suffix.
|
public static int indexOf(byte[] haystack,
byte[] needle)
haystack - The string to be scannedneedle - The target string to searchpublic static int[] createBadCharacterTable(byte[] pattern)
public static int[] makeByteTableOld(byte[] needle)
public static int[] createGoodSuffixTable(byte[] pattern)
public static int[] makeOffsetTableFromC(byte[] needle)
public static boolean isPrefix(byte[] pattern,
int p)
public static int suffixLength(byte[] needle,
int p)
Copyright © 2020. All rights reserved.