buffer-indexof

WebJar for buffer-indexof

License

License

MIT
Categories

Categories

Dex General Purpose Libraries Utility
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

buffer-indexof
Last Version

Last Version

1.1.1
Release Date

Release Date

Type

Type

jar
Description

Description

buffer-indexof
WebJar for buffer-indexof
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/soldair/node-buffer-indexof

Download buffer-indexof

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/buffer-indexof/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>buffer-indexof</artifactId>
    <version>1.1.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/buffer-indexof/
implementation 'org.webjars.npm:buffer-indexof:1.1.1'
// https://jarcasting.com/artifacts/org.webjars.npm/buffer-indexof/
implementation ("org.webjars.npm:buffer-indexof:1.1.1")
'org.webjars.npm:buffer-indexof:jar:1.1.1'
<dependency org="org.webjars.npm" name="buffer-indexof" rev="1.1.1">
  <artifact name="buffer-indexof" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='buffer-indexof', version='1.1.1')
)
libraryDependencies += "org.webjars.npm" % "buffer-indexof" % "1.1.1"
[org.webjars.npm/buffer-indexof "1.1.1"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

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

Versions

Version
1.1.1