Skip to content

feature: Buffer.prototype.indexOf #95

Closed
@srijs

Description

This has been nagging me for a while, wanting to efficiently search a buffer for a sub-string/buffer, similar to memchr/memcmp, joining Array.prototype.indexOf and String.prototype.indexOf.

I finally got around to implement it as a native module: buffer-indexof-fast (on npm and github). The semantics are 100% compatible to String.prototype.indexOf.

I know there is some discussion going on in terms of what to put into core and what not, but I figured since Buffers are such a fundamental means of sharing information, especially also with the "core", I'll just as the following question...

Would you like to have such a functionality in node-buffers? I would be open to do the work necessary to get it cleaned up and match the code quality of core, if it shows that there is the demand for it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bufferIssues and PRs related to the buffer subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions