Skip to content

Get the real length of a string - by correctly counting astral symbols and ignoring ansi escape codes

License

Notifications You must be signed in to change notification settings

LitoMore/string-length-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

string-length-cli

Get the real length of a string - by correctly counting astral symbols and ignoring ansi escape codes

String#length errornously counts astral symbols as two characters.

Install

npm i -g string-length-cli

Usage

$ string-length --help

  Usage
    $ string-length <text> [more...]

  Example
    $ string-length Jiong囧
    6

Related

License

MIT © LitoMore

About

Get the real length of a string - by correctly counting astral symbols and ignoring ansi escape codes

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published