Skip to content

Commit b44964e

Browse files
baslrrvagg
authored andcommitted
doc: added what buf.copy returns
as of https://github.com/nodejs/node/blob/v5.x/src/node_buffer.cc#L555 buf.copy returns the number of bytes copied. PR-URL: #3555 Reviewed-By: Trevor Norris <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 4ef1e24 commit b44964e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

doc/api/buffer.markdown

+2
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,8 @@ if the target memory region overlaps with the source. If `undefined` the
358358
`targetStart` and `sourceStart` parameters default to `0` while `sourceEnd`
359359
defaults to `buffer.length`.
360360

361+
Returns the number of bytes copied.
362+
361363
Example: build two Buffers, then copy `buf1` from byte 16 through byte 19
362364
into `buf2`, starting at the 8th byte in `buf2`.
363365

0 commit comments

Comments
 (0)