Skip to content

Add missing .lastIndexOf method #114

Closed
@feross

Description

@feross

Node.js documentation for .lastIndexOf: https://nodejs.org/api/buffer.html#buffer_buf_lastindexof_value_byteoffset_encoding

Identical to Buffer#indexOf(), but searches the Buffer from back to front instead of front to back. Returns the starting index position of value in Buffer or -1 if the Buffer does not contain value. The value can be a String, Buffer or Number. Strings are by default interpreted as UTF8. If byteOffset is provided, will return the last match that begins at or before byteOffset.

@dcposch's PR: nodejs/node#4846

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions