utf8-length

返回 unicode 字符串的字节数。「return the number of bytes in a unicode string」

  • Owner: substack/utf8-bytes
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

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

Main metrics

Overview
Name With Ownersubstack/utf8-bytes
Primary LanguageC
Program languageJavaScript (Language Count: 1)
Platform
License:MIT License
所有者活动
Created At2012-06-18 23:23:24
Pushed At2022-09-13 03:36:21
Last Commit At2018-11-14 14:05:58
Release Count2
Last Release Name (Posted on 2015-07-27 11:51:38)
First Release Name (Posted on 2015-07-26 23:33:04)
用户参与
Stargazers Count50
Watchers Count3
Fork Count3
Commits Count13
Has Issues Enabled
Issues Count2
Issue Open Count1
Pull Requests Count0
Pull Requests Open Count1
Pull Requests Close Count2
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private