Skip to main content
StringDecoder.prototype.write - node__string_decoder.d.ts - Node documentation
method StringDecoder.prototype.write

Usage in Deno

```typescript import { StringDecoder } from "node:node__string_decoder.d.ts"; ```
StringDecoder.prototype.write(buffer:
string
| Buffer
| ArrayBufferView
): string
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()`.

Parameters

buffer:
string
| Buffer
| ArrayBufferView
The bytes to decode.

Return Type

string