Download

Publisher description

Fast string search (indexOf) using the Boyer-Moore algorithm. Incorporate this class into your own Java programs to rapidly search strings. use: import com.mindprod.Boyer.Boyer; ... Boyer b = new Boyer("dogcatwombat"); int where = b.indexOf("cat"); or int where = Boyer.indexOf("dogcatwombat","cat"); Boyer-Moore is about twice as fast as String.indexOf when the string you are searching in is 2K or over and the pattern you are searching for is 4 characters or longer. String.indexOf is particularly slow when the pattern begins with a common letter such as "e". Boyer-Moore is fastest when the pattern is long and composed only of uncommon letters, e.g. "z" or "^". If you use a char[] instead of String for your text to be searched, it will run an additional 33% faster. Boyer automatically reverts to String.indexOf when that would be faster.


Related Programs

ASP String Component screenshot

ASP String Component 1.0

ASP String Component

314.96 KB
2007-09-25 01:32:31
Freeware
String-O-Matic screenshot

String-O-Matic 25.1

Search/replace substrings in multiple files.

4.13 MB
2017-03-08 21:23:37
Shareware
RSP String Compress OCX screenshot

RSP String Compress OCX 1.3.0

ActiveX OCX to compress and uncompress string

125.12 KB
2006-04-20 13:38:03
Shareware
Convert String for C++ screenshot

Convert String for C++ 1.0

Convert string for C++ source code.

126.57 KB
2007-09-25 01:28:42
Freeware
LandlordBG.com Random String Generator screenshot

LandlordBG.com Random String Generator 1.0

LandlordBG.com Bulgarian Properties StringGen

293.6 KB
2007-09-25 10:52:49
Freeware