mirror of https://github.com/nodejs/node.git
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: https://github.com/nodejs/node/pull/3555 Reviewed-By: Trevor Norris <trev.norris@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>pull/3555/merge
parent
934149a808
commit
3c56d5e9e3
|
@ -232,6 +232,8 @@ if the target memory region overlaps with the source. If `undefined` the
|
|||
`targetStart` and `sourceStart` parameters default to `0` while `sourceEnd`
|
||||
defaults to `buffer.length`.
|
||||
|
||||
Returns the number of bytes copied.
|
||||
|
||||
Example: build two Buffers, then copy `buf1` from byte 16 through byte 19
|
||||
into `buf2`, starting at the 8th byte in `buf2`.
|
||||
|
||||
|
|
Loading…
Reference in New Issue