No description
Find a file
2022-10-13 22:31:52 +09:00
docs fix directory 2022-10-13 15:38:31 +09:00
src fix directory 2022-10-13 15:38:31 +09:00
tests refactoring 2022-10-12 17:43:16 +09:00
tools refactoring 2022-10-12 17:49:26 +09:00
.gitignore fix directory 2022-10-13 15:38:31 +09:00
LICENSE Create LICENSE 2022-10-12 18:15:11 +09:00
README.md Update README.md 2022-10-12 20:40:59 +09:00
wcwidth.nimble update version 2022-10-13 22:31:52 +09:00

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

here

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