mirror of
https://github.com/shoyu777/wcwidth-nim
synced 2026-01-15 13:21:44 +00:00
No description
| docs | ||
| src | ||
| tests | ||
| tools | ||
| .gitignore | ||
| LICENSE | ||
| README.md | ||
| wcwidth.nimble | ||
wcwidth
Determine columns needed for a fixed-size wide-character string
wcwidth is a simple Nim port of wcwidth implemented in C by Markus Kuhn.
Example
import wcwidth
doAssert "コンニチハ世界".wcswidth == 14 # while "コンニチハ世界".runelen == 7
doAssert "Pokémon GETだぜ!".wcswidth == 17 # while "Pokémon GETだぜ!".runelen == 21
Document
Unicode Version
This library use Unicode v12.0.0 which is the same as Nim supporting version. std/unicode
(memo)Tool to generate table
nim c -r tools/generate_table.nim