package printbox-text
Text renderer for printbox, using unicode edges
Install
Dune Dependency
Authors
Maintainers
Sources
v0.6.tar.gz
md5=052766382422020d9e92641d788c1b50
sha512=95739aa35afae261912a192faff55a6f2293cf82f6e814a7329a88a03c8aaf6d26eab124687b81f98b92d96f7bbe5eaf8a376dcacca12c74f769eadede26da20
doc/printbox-text/PrintBox_text/index.html
Module PrintBox_text
Source
Render to Text
This module should be used to output boxes directly to a terminal, or another area of monospace text
Set which function is used to compute string length. Typically to be used with a unicode-sensitive length function. An example of such a function for utf8 encoded strings is the following (it uses the Uutf
and Uucp
libraries):
let string_leng s i len =
Uutf.String.fold_utf_8 ~pos:i ~len
(fun n _ c -> n+ max 0 (Uucp.Break.tty_width_hint c)) 0 s
Note that this function assumes there is no newline character in the given string.
Returns a string representation of the given structure.
Returns a string representation of the given structure, with style.
Outputs the given structure on the channel.
Pretty-print the box into this formatter.
Pretty-print the box into this formatter, with style.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page