(buf, start, end)
| 940 | return out; |
| 941 | } |
| 942 | function utf16leSlice(buf, start, end) { |
| 943 | var bytes = buf.slice(start, end); |
| 944 | var res = ''; |
| 945 | // If bytes.length is odd, the last 8 bits must be ignored (same as node.js) |
| 946 | for (var i = 0; i < bytes.length - 1; i += 2) { |
| 947 | res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256); |
| 948 | } |
| 949 | return res; |
| 950 | } |
| 951 | Buffer.prototype.slice = function slice(start, end) { |
| 952 | var len = this.length; |
| 953 | start = ~~start; |
no outgoing calls
no test coverage detected
searching dependent graphs…