stringDecoder.write(buffer)
buffer<Buffer> | <TypedArray> | <DataView> 一个Buffer、TypedArray或DataView,包含要解码的字节。- 返回:<string>
返回一个解码后的字符串,确保在返回的字符串中省略 Buffer、TypedArray 或 DataView 末尾的任何不完整多字节字符,并将其存储在内部缓冲区,以便下次调用 stringDecoder.write() 或 stringDecoder.end() 时使用。
【Returns a decoded string, ensuring that any incomplete multibyte characters at
the end of the Buffer, or TypedArray, or DataView are omitted from the
returned string and stored in an internal buffer for the next call to
stringDecoder.write() or stringDecoder.end().】