Skip to content

datibbaw/php-boyermoore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

php-boyermoore

Optimized searching for larger haystacks.

Basic usage:

    $pos = boyermoore_indexof('i like writing hello world programs', 'hello world');

This works exactly like strpos(), except that it's optimized for a larger haystack by skipping more than one characters while searching for the needle.

Advanced usage:

    $needle = boyermoore_study('hello world');
    $pos = boyermoore_indexof('i like writing hello world programs', $needle);

This option caches the meta information for the needle and then uses it to search the haystack. It's designed to be applied multiple times onto a new haystack.

About

Optimized searching for larger haystacks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published