1. utf8-length
return the number of bytes in a unicode string
utf8-length
Package: utf8-length
Created by: substack
Last modified: Tue, 08 Nov 2022 10:41:29 GMT
Version: 0.0.1
License: MIT
Downloads: 79,708
Repository: https://github.com/substack/utf8-length

Install

npm install utf8-length
yarn add utf8-length

utf8-length

return the number of bytes in a unicode string

build status

example

 var bytes = require('utf8-length');
console.log(bytes('¡dooq dǝǝq'));

result:

$ node example/beep.js
13

methods

 var bytes = require('utf8-length')

bytes(string)

Return the number of bytes needed to store string.

install

With npm do:

npm install utf8-bytes

license

MIT

Dependencies

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code