16 #if defined(HAVE_MBRTOWC) && defined(HAVE_WCWIDTH)
24 const size_t len = strlen(
str);
28 #if !(defined(HAVE_MBRTOWC) && defined(HAVE_WCWIDTH))
45 if (ret < 1 || ret >
len)
50 const int wc_width = wcwidth(wc);
return memset(p, 0, total)
Utility functions for handling multibyte strings.
size_t tuklib_mbstr_width(const char *str, size_t *bytes)
Get the number of columns needed for the multibyte string.