From: Felix Böhm Date: Wed, 16 Mar 2016 10:27:32 +0000 (+0100) Subject: doc: fix return value of write methods X-Git-Tag: v4.4.1~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4332f8011ec7bd7bf6da780a592129e012be2485;p=platform%2Fupstream%2Fnodejs.git doc: fix return value of write methods Fixes: https:github.com/nodejs/node/issues/5682 PR-URL: https://github.com/nodejs/node/pull/5736 Reviewed-By: James M Snell Reviewed-By: Benjamin Gruenbaum Reviewed-By: Sakthipriyan Vairamani --- diff --git a/doc/api/buffer.markdown b/doc/api/buffer.markdown index c163b71..6d39ffd 100644 --- a/doc/api/buffer.markdown +++ b/doc/api/buffer.markdown @@ -1027,7 +1027,7 @@ console.log(`${len} bytes: ${buf.toString('utf8', 0, len)}`); * `value` {Number} Bytes to be written to Buffer * `offset` {Number} `0 <= offset <= buf.length - 8` * `noAssert` {Boolean} Default: false -* Return: {Number} Numbers of bytes written +* Return: {Number} The offset plus the number of written bytes Writes `value` to the Buffer at the specified `offset` with specified endian format (`writeDoubleBE()` writes big endian, `writeDoubleLE()` writes little @@ -1059,7 +1059,7 @@ console.log(buf); * `value` {Number} Bytes to be written to Buffer * `offset` {Number} `0 <= offset <= buf.length - 4` * `noAssert` {Boolean} Default: false -* Return: {Number} Numbers of bytes written +* Return: {Number} The offset plus the number of written bytes Writes `value` to the Buffer at the specified `offset` with specified endian format (`writeFloatBE()` writes big endian, `writeFloatLE()` writes little @@ -1091,7 +1091,7 @@ console.log(buf); * `value` {Number} Bytes to be written to Buffer * `offset` {Number} `0 <= offset <= buf.length - 1` * `noAssert` {Boolean} Default: false -* Return: {Number} Numbers of bytes written +* Return: {Number} The offset plus the number of written bytes Writes `value` to the Buffer at the specified `offset`. The `value` must be a valid signed 8-bit integer. @@ -1117,7 +1117,7 @@ console.log(buf); * `value` {Number} Bytes to be written to Buffer * `offset` {Number} `0 <= offset <= buf.length - 2` * `noAssert` {Boolean} Default: false -* Return: {Number} Numbers of bytes written +* Return: {Number} The offset plus the number of written bytes Writes `value` to the Buffer at the specified `offset` with specified endian format (`writeInt16BE()` writes big endian, `writeInt16LE()` writes little @@ -1144,7 +1144,7 @@ console.log(buf); * `value` {Number} Bytes to be written to Buffer * `offset` {Number} `0 <= offset <= buf.length - 4` * `noAssert` {Boolean} Default: false -* Return: {Number} Numbers of bytes written +* Return: {Number} The offset plus the number of written bytes Writes `value` to the Buffer at the specified `offset` with specified endian format (`writeInt32BE()` writes big endian, `writeInt32LE()` writes little @@ -1172,7 +1172,7 @@ console.log(buf); * `offset` {Number} `0 <= offset <= buf.length - byteLength` * `byteLength` {Number} `0 < byteLength <= 6` * `noAssert` {Boolean} Default: false -* Return: {Number} Numbers of bytes written +* Return: {Number} The offset plus the number of written bytes Writes `value` to the Buffer at the specified `offset` and `byteLength`. Supports up to 48 bits of accuracy. For example: @@ -1199,7 +1199,7 @@ should not be used unless you are certain of correctness. * `value` {Number} Bytes to be written to Buffer * `offset` {Number} `0 <= offset <= buf.length - 1` * `noAssert` {Boolean} Default: false -* Return: {Number} Numbers of bytes written +* Return: {Number} The offset plus the number of written bytes Writes `value` to the Buffer at the specified `offset`. The `value` must be a valid unsigned 8-bit integer. @@ -1228,7 +1228,7 @@ console.log(buf); * `value` {Number} Bytes to be written to Buffer * `offset` {Number} `0 <= offset <= buf.length - 2` * `noAssert` {Boolean} Default: false -* Return: {Number} Numbers of bytes written +* Return: {Number} The offset plus the number of written bytes Writes `value` to the Buffer at the specified `offset` with specified endian format (`writeUInt16BE()` writes big endian, `writeUInt16LE()` writes little @@ -1262,7 +1262,7 @@ console.log(buf); * `value` {Number} Bytes to be written to Buffer * `offset` {Number} `0 <= offset <= buf.length - 4` * `noAssert` {Boolean} Default: false -* Return: {Number} Numbers of bytes written +* Return: {Number} The offset plus the number of written bytes Writes `value` to the Buffer at the specified `offset` with specified endian format (`writeUInt32BE()` writes big endian, `writeUInt32LE()` writes little @@ -1295,7 +1295,7 @@ console.log(buf); * `offset` {Number} `0 <= offset <= buf.length - byteLength` * `byteLength` {Number} `0 < byteLength <= 6` * `noAssert` {Boolean} Default: false -* Return: {Number} Numbers of bytes written +* Return: {Number} The offset plus the number of written bytes Writes `value` to the Buffer at the specified `offset` and `byteLength`. Supports up to 48 bits of accuracy. For example: