Display width <uniwidth.h>
**************************

This include file declares functions that return the display width, measured in columns, of characters or strings, when output to a device that uses non-proportional fonts.

Note that for some rarely used characters the actual fonts or terminal emulators can use a different width.  There is no mechanism for communicating the display width of characters across a Unix pseudo-terminal (tty).  Also, there are scripts with complex rendering, like the Indic scripts.  For these scripts, there is no such concept as non-proportional fonts.  Therefore the results of these functions usually work fine on most scripts and on most characters but can fail to represent the actual display width.

These functions are locale dependent.  The ENCODING argument identifies the encoding (e.g. "ISO-8859-2" for Polish).

 -- Function: int uc_width (ucs4_t UC, const char *ENCODING)
     Determines and returns the number of column positions required for UC. Returns -1 if UC is a control character that has an influence on the column position when output.

 -- Function: int u8_width (const uint8_t *S, size_t N, const char *ENCODING)
 -- Function: int u16_width (const uint16_t *S, size_t N, const char *ENCODING)
 -- Function: int u32_width (const uint32_t *S, size_t N, const char *ENCODING)
     Determines and returns the number of column positions required for first N units (or fewer if S ends before this) in S.  This function ignores control characters in the string.

 -- Function: int u8_strwidth (const uint8_t *S, const char *ENCODING)
 -- Function: int u16_strwidth (const uint16_t *S, const char *ENCODING)
 -- Function: int u32_strwidth (const uint32_t *S, const char *ENCODING)
     Determines and returns the number of column positions required for S. This function ignores control characters in the string.