Document defaults for buffer.copy()

v0.7.4-release
Ryan Dahl 2010-11-29 19:52:47 -08:00
parent a326eebac8
commit 6d7242b485
2 changed files with 2 additions and 2 deletions

View File

@ -113,7 +113,7 @@ buffer object. It does not change when the contents of the buffer are changed.
// 1234
// 1234
### buffer.copy(targetBuffer, targetStart, sourceStart, sourceEnd=buffer.length)
### buffer.copy(targetBuffer, targetStart, sourceStart=0, sourceEnd=buffer.length)
Does a memcpy() between buffers.

View File

@ -280,7 +280,7 @@ Buffer.prototype.toString = function (encoding, start, end) {
Buffer.byteLength = SlowBuffer.byteLength;
// copy(targetBuffer, targetStart, sourceStart, sourceEnd=buffer.length)
// copy(targetBuffer, targetStart, sourceStart=0, sourceEnd=buffer.length)
Buffer.prototype.copy = function copy (target, target_start, start, end) {
var source = this;
start || (start = 0);