package wcwidth
Get terminal display width of a string
Install
Dune Dependency
Authors
Maintainers
Sources
wcwidth-1.0.1.tbz
sha256=7cd177bea7dd3b5eaf6b84e269257503d9ef7e12c4623ba6ce0dbf9e20f5e3f0
sha512=bdbf11c94c76090b8687f5a60cb1c8908a1b7430b15794eec5955fac49c58e5a0648a9f241cf183962ee0bff8780f7bcb3c0996e5f230278c94131d203ed48c5
doc/index.html
wcwidth
wcwidth
is a small library for calculating the terminal display width of a string. This is often the same as Stdlib.String.length
, but differs when 'wide' characters (such as CJK characters or emoji) are used.
The wcwidth
and wcswidth
C functions are actually defined as part of the POSIX standard (see man 3 wcwidth
, for example). This library, however, uses a very minimal reimplementation of the wcwidth Python package.
In principle, this should be a standalone library, not bundled as part of whatwhat
. However, I (Jon) am not yet confident enough in the correctness of the code to publish it on OPAM.
The API is very simple: it consists of three functions, and is documented at Wcwidth
.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>