0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/doc/api
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
..
_toc.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
addons.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
all.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
assert.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
buffer.md buffer: add Buffer.prototype.lastIndexOf() 2016-04-25 08:24:28 -07:00
child_process.md doc: fix broken references 2016-04-22 19:08:48 -07:00
cli.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
cluster.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
console.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
crypto.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
debugger.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
dgram.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
dns.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
documentation.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
domain.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
errors.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
events.md events: add prependListener() and prependOnceListener() 2016-04-22 09:28:37 -07:00
fs.md doc: add note for platform specific flags fs.open() 2016-04-22 11:32:22 -07:00
globals.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
http.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
https.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
index.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
modules.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
net.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
os.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
path.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
process.md doc: fix broken references 2016-04-22 19:08:48 -07:00
punycode.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
querystring.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
readline.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
repl.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
stream.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
string_decoder.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
synopsis.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
timers.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
tls.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
tty.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
url.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
util.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
v8.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
vm.md doc: add vm example, be able to require modules 2016-04-21 21:44:41 -07:00
zlib.md doc: git mv to .md 2016-04-20 16:34:27 -07:00