Home
last modified time | relevance | path

Searched refs:twoByteString (Results 1 – 2 of 2) sorted by relevance

/third_party/node/test/parallel/
Dtest-buffer-includes.js141 let twoByteString = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'ucs2'); variable
143 assert(twoByteString.includes('\u0395', 4, 'ucs2'));
144 assert(twoByteString.includes('\u03a3', -4, 'ucs2'));
145 assert(twoByteString.includes('\u03a3', -6, 'ucs2'));
146 assert(twoByteString.includes(
148 assert(!twoByteString.includes('\u03a3', -2, 'ucs2'));
163 twoByteString = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'ucs2');
166 assert(twoByteString.includes('\u039a', 0, 'ucs2'));
167 assert(twoByteString.includes('\u0391', 0, 'ucs2'), 'Alpha');
168 assert(twoByteString.includes('\u03a3', 0, 'ucs2'), 'First Sigma');
[all …]
Dtest-buffer-indexof.js185 const twoByteString = Buffer.from( constant
188 assert.strictEqual(twoByteString.indexOf('\u0395', 4, encoding), 8);
189 assert.strictEqual(twoByteString.indexOf('\u03a3', -4, encoding), 6);
190 assert.strictEqual(twoByteString.indexOf('\u03a3', -6, encoding), 4);
191 assert.strictEqual(twoByteString.indexOf(
193 assert.strictEqual(-1, twoByteString.indexOf('\u03a3', -2, encoding));
211 const twoByteString = Buffer.from('\u039a\u0391\u03a3\u03a3\u0395', 'ucs2'); constant
214 assert.strictEqual(twoByteString.indexOf('\u039a', 0, 'ucs2'), 0);
215 let index = twoByteString.indexOf('\u0391', 0, 'ucs2');
217 index = twoByteString.indexOf('\u03a3', 0, 'ucs2');
[all …]