mirror of https://github.com/nodejs/node.git
buffer: document concat zero-fill
PR-URL: https://github.com/nodejs/node/pull/55562 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jason Zhang <xzha4350@gmail.com>pull/56271/head
parent
a50f3d5d8a
commit
bc64114ebf
|
@ -1042,7 +1042,8 @@ in `list` by adding their lengths.
|
|||
|
||||
If `totalLength` is provided, it is coerced to an unsigned integer. If the
|
||||
combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is
|
||||
truncated to `totalLength`.
|
||||
truncated to `totalLength`. If the combined length of the `Buffer`s in `list` is
|
||||
less than `totalLength`, the remaining space is filled with zeros.
|
||||
|
||||
```mjs
|
||||
import { Buffer } from 'node:buffer';
|
||||
|
|
Loading…
Reference in New Issue