BSD Ports

textproc/p5-Text-CharWidth 0.04p0 OpenBSD

get number of occupied columns of a string on terminal

System
OpenBSD
Repository
OpenBSD ports
Maintainer
The OpenBSD ports mailing-list <[email protected]>
Categories
textproc, perl5

Description

This module allows determining the display width of strings, mostly useful with multibyte character encodings. It provides functionality equivalent to C's wcwidth(3), wcswidth(3) and mblen(3).

While most characters have a width of 1, there are exceptions - many east Asian characters have a width of 2, and some languages use Unicode "combining characters" which have a zero width.

In the other systems

SystemPortVersion
OpenBSDtextproc/p5-Text-CharWidth0.04p0
FreeBSDtextproc/p5-Text-CharWidth0.04_2
NetBSDtextproc/p5-Text-CharWidth0.04nb18
DragonFlytextproc/p5-Text-CharWidth0.04_2
MidnightBSDtextproc/p5-Text-CharWidth0.04_2
HardenedBSDtextproc/p5-Text-CharWidth0.04_2
GhostBSDtextproc/p5-Text-CharWidth0.04_2

Install

Binary package:

pkg_add p5-Text-CharWidth

From the ports tree:

cd /usr/ports/textproc/p5-Text-CharWidth && make install

Dependencies

No port depends on this one.