diff options
author | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2019-01-17 13:09:02 +0200 |
---|---|---|
committer | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2019-01-19 20:07:34 +0200 |
commit | c1ac57888199ba13df7eda4912cdb53dcfb5a2ee (patch) | |
tree | 2067ddbd0407e83bceea3f9f77c8fb55ee844509 /doc/api | |
parent | 2e613a9c301165d121b19b86e382860323abc22f (diff) | |
download | android-node-v8-c1ac57888199ba13df7eda4912cdb53dcfb5a2ee.tar.gz android-node-v8-c1ac57888199ba13df7eda4912cdb53dcfb5a2ee.tar.bz2 android-node-v8-c1ac57888199ba13df7eda4912cdb53dcfb5a2ee.zip |
doc: add a note to `buf.fill()` description
PR-URL: https://github.com/nodejs/node/pull/25547
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/buffer.md | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/api/buffer.md b/doc/api/buffer.md index 0a73a1d8a9..49766866dc 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -1238,7 +1238,9 @@ console.log(b.toString()); // Prints: hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh ``` -`value` is coerced to a `uint32` value if it is not a string or integer. +`value` is coerced to a `uint32` value if it is not a string, `Buffer`, or +integer. If the resulting integer is greater than `255` (decimal), `buf` will be +filled with `0`. If the final write of a `fill()` operation falls on a multi-byte character, then only the bytes of that character that fit into `buf` are written: |