Closed yongrenjie closed 1 year ago
This is the equivalent in Haskell: https://hackage.haskell.org/package/vty-5.38/docs/Graphics-Text-Width.html (https://github.com/jtdaugherty/vty)
It's a wrapper around a C library. Now, how do we do that in Ocaml...
wcwidth
(and wcswidth
) are actually part of the POSIX spec: https://man7.org/linux/man-pages/man3/wcwidth.3.html
Inside the
pretty.ml
module we're usingString.length
a lot, when we should really be using the display width of the string.e.g.
when it should only really be 2.