Skip to content

Commit f264dd6

Browse files
duncproaduh95
authored andcommitted
buffer: document concat zero-fill
PR-URL: #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>
1 parent 59cae91 commit f264dd6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

doc/api/buffer.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1042,7 +1042,8 @@ in `list` by adding their lengths.
10421042

10431043
If `totalLength` is provided, it is coerced to an unsigned integer. If the
10441044
combined length of the `Buffer`s in `list` exceeds `totalLength`, the result is
1045-
truncated to `totalLength`.
1045+
truncated to `totalLength`. If the combined length of the `Buffer`s in `list` is
1046+
less than `totalLength`, the remaining space is filled with zeros.
10461047

10471048
```mjs
10481049
import { Buffer } from 'node:buffer';

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy