assert(!isNaN(byte), 'Invalid hex string')
buf[offset + i] = byte
}
- Buffer._charsWritten = i * 2
return i
}
function utf8Write (buf, string, offset, length) {
- var charsWritten = Buffer._charsWritten =
- blitBuffer(utf8ToBytes(string), buf, offset, length)
+ var charsWritten = blitBuffer(utf8ToBytes(string), buf, offset, length)
return charsWritten
}
function asciiWrite (buf, string, offset, length) {
- var charsWritten = Buffer._charsWritten =
- blitBuffer(asciiToBytes(string), buf, offset, length)
+ var charsWritten = blitBuffer(asciiToBytes(string), buf, offset, length)
return charsWritten
}
}
function base64Write (buf, string, offset, length) {
- var charsWritten = Buffer._charsWritten =
- blitBuffer(base64ToBytes(string), buf, offset, length)
+ var charsWritten = blitBuffer(base64ToBytes(string), buf, offset, length)
return charsWritten
}
function utf16leWrite (buf, string, offset, length) {
- var charsWritten = Buffer._charsWritten =
- blitBuffer(utf16leToBytes(string), buf, offset, length)
+ var charsWritten = blitBuffer(utf16leToBytes(string), buf, offset, length)
return charsWritten
}