doc: general improvements to string_decoder.md copy#6940
Closed
jasnell wants to merge 4 commits intonodejs:masterfrom
Closed
doc: general improvements to string_decoder.md copy#6940jasnell wants to merge 4 commits intonodejs:masterfrom
jasnell wants to merge 4 commits intonodejs:masterfrom
Conversation
| ## Class: StringDecoder | ||
| When a `Buffer` instance is written to the `StringDecoder` instance, an | ||
| internal buffer is used to ensure that the decoded string does not contain | ||
| any partial multibyte-characters. These are held in the buffer until the |
Member
There was a problem hiding this comment.
tiny nit: multibyte characters (and I’d maybe call them incomplete instead of partial but that’s certainly a question of personal taste)
Member
Author
|
nits addressed! |
Member
|
LGTM! |
| Creates a new `StringDecoder` instance. | ||
|
|
||
| ### decoder.end() | ||
| ### stringDecoder.end() |
Contributor
There was a problem hiding this comment.
Actually end() can accept a Buffer just like write(). In that case, .write(buffer) is called first before adding any replacement characters.
Member
Author
There was a problem hiding this comment.
Good point! I'd forgotten about that and it wasn't previously documented.
Member
Author
|
@mscdex ... updated! I updated the example also to show a Buffer being passed to |
| Creates a new `StringDecoder` instance. | ||
|
|
||
| ### stringDecoder.end() | ||
| ### stringDecoder.end(buffer) |
Member
Author
|
@mscdex ... done! |
Contributor
|
LGTM |
jasnell
added a commit
that referenced
this pull request
May 25, 2016
PR-URL: #6940 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Brian White <[email protected]>
Member
Author
|
Landed in 9140b97. Thank you! |
Fishrock123
pushed a commit
to Fishrock123/node
that referenced
this pull request
May 30, 2016
PR-URL: nodejs#6940 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Brian White <[email protected]>
rvagg
pushed a commit
that referenced
this pull request
Jun 2, 2016
PR-URL: #6940 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Brian White <[email protected]>
Contributor
|
adding don't land label. Please feel free to backport @jasnell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
Affected core subsystem(s)
doc (string_decoder)
Description of change
General improvements to string_decoder.md
@nodejs/documentation