@@ -500,7 +500,6 @@ console.log(buf1.toString());
500500// Prints: this is a tC)st
501501console .log (buf1 .toString (' ascii' ));
502502
503-
504503const buf2 = new Buffer (' 7468697320697320612074c3a97374' , ' hex' );
505504
506505// Prints: this is a tést
@@ -908,7 +907,6 @@ console.log(buf1.toString());
908907// Prints: this is a tC)st
909908console .log (buf1 .toString (' ascii' ));
910909
911-
912910const buf2 = Buffer .from (' 7468697320697320612074c3a97374' , ' hex' );
913911
914912// Prints: this is a tést
@@ -1364,7 +1362,6 @@ console.log(buf.indexOf(Buffer.from('a buffer example')));
13641362// Prints: 8
13651363console .log (buf .indexOf (Buffer .from (' a buffer example' ).slice (0 , 8 )));
13661364
1367-
13681365const utf16Buffer = Buffer .from (' \u039a\u0391\u03a3\u03a3\u0395 ' , ' ucs2' );
13691366
13701367// Prints: 4
@@ -1475,7 +1472,6 @@ console.log(buf.lastIndexOf('buffer', 5));
14751472// Prints: -1
14761473console .log (buf .lastIndexOf (' buffer' , 4 ));
14771474
1478-
14791475const utf16Buffer = Buffer .from (' \u039a\u0391\u03a3\u03a3\u0395 ' , ' ucs2' );
14801476
14811477// Prints: 6
@@ -1998,7 +1994,6 @@ buf1.swap16();
19981994// Prints: <Buffer 02 01 04 03 06 05 08 07>
19991995console .log (buf1);
20001996
2001-
20021997const buf2 = Buffer .from ([0x1 , 0x2 , 0x3 ]);
20031998
20041999// Throws an exception: RangeError: Buffer size must be a multiple of 16-bits
@@ -2028,7 +2023,6 @@ buf1.swap32();
20282023// Prints: <Buffer 04 03 02 01 08 07 06 05>
20292024console .log (buf1);
20302025
2031-
20322026const buf2 = Buffer .from ([0x1 , 0x2 , 0x3 ]);
20332027
20342028// Throws an exception: RangeError: Buffer size must be a multiple of 32-bits
@@ -2058,7 +2052,6 @@ buf1.swap64();
20582052// Prints: <Buffer 08 07 06 05 04 03 02 01>
20592053console .log (buf1);
20602054
2061-
20622055const buf2 = Buffer .from ([0x1 , 0x2 , 0x3 ]);
20632056
20642057// Throws an exception: RangeError: Buffer size must be a multiple of 64-bits
@@ -2130,7 +2123,6 @@ console.log(buf1.toString('ascii'));
21302123// Prints: abcde
21312124console .log (buf1 .toString (' ascii' , 0 , 5 ));
21322125
2133-
21342126const buf2 = Buffer .from (' tést' );
21352127
21362128// Prints: 74c3a97374
0 commit comments