Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Buffer.lastIndexOf #4846

Closed
wants to merge 2 commits into from
Closed

feature: Buffer.lastIndexOf #4846

wants to merge 2 commits into from

Commits on Apr 22, 2016

  1. doc: for Buffer.lastIndexOf

    dcposch committed Apr 22, 2016
    Configuration menu
    Copy the full SHA
    6b6f2c1 View commit details
    Browse the repository at this point in the history
  2. feature: Buffer.lastIndexOf

    * Remove unnecessary templating from SearchString
    
      SearchString used to have separate PatternChar and SubjectChar template type
      arguments, apparently to support things like searching for an 8-bit string
      inside a 16-bit string or vice versa. However, SearchString is only used from
      node_buffer.cc, where PatternChar and SubjectChar are always the same. Since
      this is extra complexity that's unused and untested (simplifying to a single
      Char template argument still compiles and didn't break any unit tests), I
      removed it.
    
    * Use Boyer-Hoore[-Horspool] for both indexOf and lastIndexOf
    
      Add test cases for lastIndexOf. Test the fallback from BMH to
      Boyer-Moore, which looks like it was totally untested before.
    
    * Extra bounds checks in node_buffer.cc
    
    * Extra asserts in string_search.h
    
    * Buffer.lastIndexOf: clean up, enforce consistency w/ String.lastIndexOf
    
    * Polyfill memrchr(3) for non-GNU systems
    dcposch committed Apr 22, 2016
    Configuration menu
    Copy the full SHA
    698ed92 View commit details
    Browse the repository at this point in the history