Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions doc/api/string_decoder.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,11 @@ added: v0.9.3
* `buffer` {string|Buffer|TypedArray|DataView} The bytes to decode.
* Returns: {string}

Returns any remaining input stored in the internal buffer as a string. Bytes
representing incomplete UTF-8 and UTF-16 characters will be replaced with
substitution characters appropriate for the character encoding.
Returns any remaining input stored in the internal buffer as a string.
An incomplete UTF-8 sequence at the end of the input is decoded as the
replacement character (`U+FFFD`). For UTF-16LE, a trailing byte that does not form
a complete code unit is discarded, and a trailing unpaired high surrogate is
returned as a single code unit.

If the `buffer` argument is provided, one final call to `stringDecoder.write()`
is performed before returning the remaining input.
Expand Down