From 98762d2ae134e2bc273f2944e53e62e2c026aa03 Mon Sep 17 00:00:00 2001 From: Manuel B Date: Wed, 28 Oct 2015 01:39:23 +0100 Subject: [PATCH] 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 Reviewed-By: James M Snell --- doc/api/buffer.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/api/buffer.markdown b/doc/api/buffer.markdown index c678c4a2da8b13..f177299ea6cdb6 100644 --- a/doc/api/buffer.markdown +++ b/doc/api/buffer.markdown @@ -358,6 +358,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`.