Get the display width of a Unicode character. Returns -1 if the character is unprintable. (Note that there isn't actually a good way to actually input a single Unicode character. For example, you can't use a character literal. You can use to_utf8, though.)
val wcswidth : string -> int
Get the display width of a string. Returns -1 if any of the characters within it are unprintable. Note especially that line feeds and carriage returns WILL return -1, so make sure the string you're passing doesn't contain those.