Skip to content

shoyu777/wcwidth-nim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Implementation of wcwidth with Nim.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages