Rizin
unix-like reverse engineering framework and cli tools
|
Get the field width for printf() e.g. to align table columns. More...
#include "tuklib_mbstr.h"
Go to the source code of this file.
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.
Definition in file tuklib_mbstr_fw.c.
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
Definition at line 17 of file tuklib_mbstr_fw.c.
References len, cmd_descs_generate::str, tuklib_mbstr_width, and width.