Rizin
unix-like reverse engineering framework and cli tools
|
Calculate width of a multibyte string. More...
Go to the source code of this file.
Functions | |
size_t | tuklib_mbstr_width (const char *str, size_t *bytes) |
Get the number of columns needed for the multibyte string. More... | |
Calculate width of a multibyte string.
Definition in file tuklib_mbstr_width.c.
Get the number of columns needed for the multibyte string.
This is somewhat similar to wcswidth() but works on multibyte strings.
str | String whose width is to be calculated. If the current locale uses a multibyte character set that has shift states, the string must begin and end in the initial shift state. |
bytes | If this is not NULL, *bytes is set to the value returned by strlen(str) (even if an error occurs when calculating the width). |
Definition at line 22 of file tuklib_mbstr_width.c.
References bytes, i, len, memset(), NULL, cmd_descs_generate::str, and width.