|
XZ Utils
5.2.5
|
Get the field width for printf() e.g. to align table columns. More...
#include "tuklib_mbstr.h"Functions | |
| int | tuklib_mbstr_fw (const char *str, int columns_min) |
| Get the field width for printf() e.g. to align table columns. More... | |
Get the field width for printf() e.g. to align table columns.
| int tuklib_mbstr_fw | ( | const char * | str, |
| int | columns_min | ||
| ) |
Get the field width for printf() e.g. to align table columns.
Printing simple tables to a terminal can be done using the field field feature in the printf() format string, but it works only with single-byte character sets. To do the same with multibyte strings, tuklib_mbstr_fw() can be used to calculate appropriate field width.
The behavior of this function is undefined, if