Similar logic to what's done in termbox-go, but also handles chars with wcwidth>2 if those exist.
Note _XOPEN_SOURCE has to be defined to make wcwidth available. Also note wcwidth relies on locale, so users will probably want to call setlocale(LC_ALL, "") before tb_init.
Similar logic to what's done in termbox-go, but also handles chars with wcwidth>2 if those exist.
Note
_XOPEN_SOURCE
has to be defined to makewcwidth
available. Also notewcwidth
relies on locale, so users will probably want to callsetlocale(LC_ALL, "")
beforetb_init
.