package printbox
Allows to print nested boxes, lists, arrays, tables in several formats
Install
Dune Dependency
Authors
Maintainers
Sources
0.4.tar.gz
md5=c32598a4923c055fba05d747d24b7d4f
sha512=1b6d5981c73fa9d373ba1a555be655d5658fa2bb3105b692daf21158119bdc0c10424437de17eab0c8ac77a99877be6ace9aa0e1518212811bb3342211882e26
doc/printbox/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