Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
return the number of bytes in a unicode string
branch: master
Failed to load latest commit information.
example example works
test
.travis.yml travis
LICENSE package.json etc
index.js Use @mathiasbynens' astral-safe version
package.json fix the safari version
readme.markdown added testling badge

readme.markdown

utf8-length

return the number of bytes in a unicode string

build status

browser support

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

Something went wrong with that request. Please try again.