wcwidth

Implementation of wcwidth with Nim.

Pure Nim score 15/100 · tests present · no docs generated

Summary

Latest Version Unknown
License MIT
CI Status Failing
Downloads 0
Last Indexed 2026-07-21 05:25

Installation

nimble install wcwidth
choosenim install wcwidth
git clone https://github.com/shoyu777/wcwidth-nim

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
wcwidth - - - - - - -

Source

Repository https://github.com/shoyu777/wcwidth-nim
Homepage https://github.com/shoyu777/wcwidth-nim
Registry Source nimble_official

README

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