boyer_moore 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -13
- data/lib/boyer_moore/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 303f4624a20a48f5b2f8ea4784426ae186143943
|
4
|
+
data.tar.gz: 7c7bc24d1d32a05c138fbf614928ca63e27db592
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb1abf64fd6b1cd88a721cc0cef3b7f19a80001865e112f2c599b290a22e79075a8516e8479aecded4a4b3ae27cfcfd6d94515748d1a96299f806ff2c0e596ce
|
7
|
+
data.tar.gz: 16540ebe1554a24bfe620ae3dba30137ff96539e8887844f7545a30c2ef33d4ea08ca84b4f6abfc4a67ee4e249547c1beb708a030bc92b7dc038d7d71d6ebfff
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# BoyerMoore
|
2
2
|
|
3
|
-
|
3
|
+
Inspired by https://github.com/jashmenn/boyermoore
|
4
4
|
|
5
|
-
|
5
|
+
BoyerMoore is the fastest substring search strategy.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -22,15 +22,9 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake false` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
-
|
31
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
-
|
33
|
-
## Contributing
|
34
|
-
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/boyer_moore.
|
25
|
+
```ruby
|
26
|
+
BoyerMoore.search("foobar", "bar") # => 3
|
27
|
+
BoyerMoore.search("foobar", "oof") # => nil
|
28
|
+
BoyerMoore.search("foobar", "foo") # => 0
|
36
29
|
|
30
|
+
```
|
data/lib/boyer_moore/version.rb
CHANGED