Skip to content

afeiship/next-str2ucode

Repository files navigation

next-str2ucode

Wrap '\u200b' for string

install:

npm install -S afeiship/next-str2ucode --registry=https://registry.npm.taobao.org

usage:

nx.str2ucode('A')

resouces:

reference:

Code Name of the character Sample Width of the character
U+0020 SPACE foo bar Depends on font, typically 1/4 em, often adjusted
U+00A0 NO-BREAK SPACE foo bar As a space, but often not adjusted
U+1680 OGHAM SPACE MARK foobar Unspecified; usually not really a space but a dash
U+180E MONGOLIAN VOWEL SEPARATOR foobar 0
U+2000 EN QUAD foo bar 1 en (= 1/2 em)
U+2001 EM QUAD foobar 1 em (nominally, the height of the font)
U+2002 EN SPACE (nut) foobar 1 en (= 1/2 em)
U+2003 EM SPACE (mutton) foobar 1 em
U+2004 THREE-PER-EM SPACE (thick space) foobar 1/3 em
U+2005 FOUR-PER-EM SPACE (mid space) foobar 1/4 em
U+2006 SIX-PER-EM SPACE foobar 1/6 em
U+2007 FIGURE SPACE foobar “Tabular width”, the width of digits
U+2008 PUNCTUATION SPACE foobar The width of a period “.”
U+2009 THIN SPACE foobar 1/5 em (or sometimes 1/6 em)
U+200A HAIR SPACE foobar Narrower than THIN SPACE
U+200B ZERO WIDTH SPACE foobar 0
U+202F NARROW NO-BREAK SPACE foobar Narrower than NO-BREAK SPACE (or SPACE), “typically the width of a thin space or a mid space”
U+205F MEDIUM MATHEMATICAL SPACE foobar 4/18 em
U+3000 IDEOGRAPHIC SPACE foo bar The width of ideographic (CJK) characters.
U+FEFF ZERO WIDTH NO-BREAK SPACE foobar 0

About

Wrap '\u200b' for string.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published