package wcwidth
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
Get terminal display width of a string
Install
dune-project
Dependency
Authors
Maintainers
Sources
v1.1.0.tar.gz
md5=1efe8d35df972a05b9c041c2918c7c60
sha512=f3ebb5977894d2659bf6c13c8d6b744bdab79d425dde1b85aeac999776d3e705f3a2f9e36f6f3c2c12190a4b4466059029dd22edaab3c3f38bc2853bc038a8e3
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)"
>