package printbox-text
Text renderer for printbox, using unicode edges
Install
Dune Dependency
Authors
Maintainers
Sources
printbox-0.11.tbz
sha256=7a3935545f8b44c4380bdd78ac434d4e83b18c98ba96241b3c79530bd75839e9
sha512=a77692bfb5e96d6512646f6c7e3a6eb15770e12abb19bd09ef6d0cecf84976f69ff45ac703e56bed0552ed845d8b5afa08346cf0b6895bc3e3fd2add088cfc78
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