We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 51702ef commit cd2b3abCopy full SHA for cd2b3ab
doc/api/buffer.md
@@ -528,6 +528,10 @@ Returns the actual byte length of a string. This is not the same as
528
[`String.prototype.length`][] since that returns the number of *characters* in
529
a string.
530
531
+*Note* that for `'base64'` and `'hex'`, this function assumes valid input. For
532
+strings that contain non-Base64/Hex-encoded data (e.g. whitespace), the return
533
+value might be greater than the length of a `Buffer` created from the string.
534
+
535
Example:
536
537
```js
0 commit comments