Home » Web Developer » Java & JavaScript » Boyer 1.5

Boyer 1.5

Fast string search (indexOf) using the Boyer-Moore algorithm.

Developer:
Canadian Mind Products
License:
Freeware
OS:
Windows 98 / ME / 2000 / XP / 2003 / Vista / Unix / Linux / Mac OS X / Mac OS Other
Requirements:
Java 1.1+
Price:
Free
Price is subject to change at any time by the company
Date added:
4/1/2009
Last Update:
6/16/2007
User Rating:
Not yet rated.
Your Rating:
Download free trial ( Free full version | 547 KB )
Boyer 1.5 Publisher's 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 downloads for Boyer
New release of Java & JavaScript
More products from Canadian Mind Products
  • BoyerIni 1.2Windows *.ini file verifier, tidier and sorter.
  • BoyerNetworkCam 1.6Java Applet to view a Webcam stream of JPG images
  • BoyerEchoserver 1.3See what browsers and programs are sending to an HTTP Server.
  • BoyerCMOSSave 4.6Check CMOS for corruption and automatically restore it.
  • BoyerTransporter 1.4Lightweight Java classes to let you encrypt/sign/armour for secure transmission.