node-bitap icon indicating copy to clipboard operation
node-bitap copied to clipboard

Mishandling first character of text

Open mingzian opened this issue 4 years ago • 0 comments

Another issue I found is that there is something wrong in how your program handles the very beginning of he text where search should happen. For example:

bitap('test related to text beginning', 'te', 0)
[ 10, 17 ]

That misses the match at the very beginning. Compare to:

bitap(' test related to text beginning', 'te', 0)
[ 2, 11, 18 ]

mingzian avatar Feb 25 '21 02:02 mingzian