source: trip-planner-front/node_modules/buffer-indexof/README.md@ bdd6491

Last change on this file since bdd6491 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 729 bytes
Line 
1[![Build Status](https://secure.travis-ci.org/soldair/node-buffer-indexof.png)](http://travis-ci.org/soldair/node-buffer-indexof)
2
3
4buffer-indexof
5===================
6
7find the index of a buffer in a buffer. should behave like String.indexOf etc.
8
9```js
10
11var bindexOf = require('buffer-indexof');
12
13var newLineBuffer = new Buffer("\n");
14
15var b = new Buffer("hi\nho\nsilver");
16
17
18bindexOf(b,newLineBuffer) === 2
19
20// you can also start from index
21
22bindexOf(b,newLineBuffer,3) === 5
23
24// no match === -1
25
26bindexOf(b,newLineBuffer,6) === -1
27
28
29```
30
31CHANGELOG
32----------
33
34- 1.0.0
35 - fixed issue finding multibyte needles in haystack. thanks @imulus
36- 1.0.1
37 - fixed failing to find partial matches as pointed out by @bahaa-aidi in #2
Note: See TracBrowser for help on using the repository browser.