0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/doc
dcposch@dcpos.ch 6c1e5ad3ab buffer: add Buffer.prototype.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

PR-URL: https://github.com/nodejs/node/pull/4846
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2016-04-25 08:24:28 -07:00
..
api buffer: add Buffer.prototype.lastIndexOf() 2016-04-25 08:24:28 -07:00
api_assets doc: fix scrolling on iOS devices 2016-04-09 18:21:05 +02:00
ctc-meetings doc: add CTC meeting minutes 2016-02-10 2016-03-21 15:54:35 -07:00
guides doc: add "building node with ninja" guide 2016-02-23 12:23:45 -05:00
topics doc: add domain postmortem 2016-04-15 15:12:26 -06:00
tsc-meetings
full-white-stripe.jpg build: update Node.js logo on Win installer 2016-03-06 20:22:36 -06:00
node.1 process: add 'warning' event and process.emitWarning() 2016-03-24 13:19:11 -07:00
onboarding-extras.md doc: add onboarding resources 2016-03-14 11:35:04 -04:00
onboarding.md doc: add onboarding resources 2016-03-14 11:35:04 -04:00
osx_installer_logo.png build: update Node.js logo on OSX installer 2016-02-27 16:49:56 +11:00
releases.md doc: add instructions to only sign a release 2016-03-24 21:25:23 -07:00
template.html doc: improve scrolling, various CSS tweaks 2016-02-14 05:46:18 +01:00
thin-white-stripe.jpg build: update Node.js logo on Win installer 2016-03-06 20:22:36 -06:00