Go to Latest
method Buffer.byteLength
import { Buffer } from "https://dotland.deno.dev/std@0.110.0/node/buffer.ts";

Returns the byte length of a string when encoded. This is not the same as String.prototype.length, which does not account for the encoding that is used to convert the string into bytes.

Parameters

string:
| string
| ArrayBufferView
| ArrayBuffer
| SharedArrayBuffer
optional
encoding = [UNSUPPORTED]

Returns

number