Unverified Commit d03d9a05 authored by Harshitha KP's avatar Harshitha KP Committed by Anna Henningsen
Browse files

doc: clarify `length` param in `buffer.write`

`buffer.write` documentation has an incaccuracy w.r.t the `length`
parameter: It says default number of bytes written is
`buf.length - offset`. Change it to:
If the buffer has sufficient space from the offset, the string is
written upto `length`.
If the buffer is short in space, only `buf.length - offset` bytes are
written.

Refs: https://github.com/nodejs/node/pull/32104#discussion_r388524733

PR-URL: https://github.com/nodejs/node/pull/32119


Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
parent c452632d
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment