Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/html_parser/src/deps.ts>Buffer.byteLength

Port of fb55/htmlparser2 for Deno
Latest
method Buffer.byteLength
import { Buffer } from "https://deno.land/x/html_parser@v0.1.3/src/deps.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