1.1.1 • Published 7 years ago

buffer-indexof v1.1.1

Weekly downloads
7,945,778
License
MIT
Repository
github
Last release
7 years ago

Build Status

buffer-indexof

find the index of a buffer in a buffer. should behave like String.indexOf etc.

var bindexOf = require('buffer-indexof');

var newLineBuffer = new Buffer("\n");

var b = new Buffer("hi\nho\nsilver");


bindexOf(b,newLineBuffer) === 2

// you can also start from index

bindexOf(b,newLineBuffer,3) === 5

// no match === -1

bindexOf(b,newLineBuffer,6) === -1

CHANGELOG

  • 1.0.0
    • fixed issue finding multibyte needles in haystack. thanks @imulus
  • 1.0.1
    • fixed failing to find partial matches as pointed out by @bahaa-aidi in #2
1.1.1

7 years ago

1.1.0

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

9 years ago

0.0.2

10 years ago

0.0.1

11 years ago

0.0.0

11 years ago