Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/gauntlet/imports/mod.ts>Buffer.byteLength

Work-in-progress front-end tool which does put a smile on my face
Latest
method Buffer.byteLength
import { Buffer } from "https://deno.land/x/gauntlet@v0.0.9/imports/mod.ts";

Gives the actual byte length of a string. encoding defaults to 'utf8'. This is not the same as String.prototype.length since that returns the number of characters in a string.

Parameters

string: string

string to test.

optional
encoding: string

encoding used to evaluate (defaults to 'utf8')

Returns

number