Download Jar. Libraryless. Click here for Pure Java version (1217L/9K).
!7 p { BoyerMooreStringSearch searcher = new("hello"); assertEquals(6, searcher.search("el he hello")); assertEquals(-1, searcher.search("el he helo")); // try special characters searcher = new BoyerMooreStringSearch("x"); assertEquals(-1, searcher.search(u_umlaut())); assertEquals(-1, searcher.search(unicode_blackRightArrow())); assertEquals(0, new BoyerMooreStringSearch(unicode_blackRightArrow()).search(unicode_blackRightArrow())); print("OK"); }
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1013281 |
Snippet name: | Test BoyerMooreStringSearch (OK) |
Eternal ID of this version: | #1013281/6 |
Text MD5: | e7d8b7a1c516b42c795bed55f2948a52 |
Transpilation MD5: | 0b1384514c75ea422567e4054030fbb4 |
Author: | stefan |
Category: | javax / string searching |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-12-31 08:27:19 |
Source code size: | 491 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 480 / 1170 |
Version history: | 5 change(s) |
Referenced in: | -