WCWIDTH(3)

NAME
wcwidth, wcwidth_l - number of column positions of a wide-character code

SYNOPSIS
#include <wchar.h>
int
wcwidth(wchar_t wc);
#include <xlocale.h>
int
wcwidth_l(wchar_t wc, locale_t loc);

DESCRIPTION
The wcwidth() and wcwidth_l() functions determine the number of column positions required to display the wide character wc. The wcwidth_l() function uses the locale provided as parameter, while wcwidth_l() uses the current locale.

RETURN VALUES
The wcwidth() and wcwidth_l() functions return 0 if the wc argument is a null wide character (L'\0'), -1 if wc is not printable, otherwise they return the number of column positions the character occupies.

SEE ALSO
iswprint(3), wcswidth(3) xlocale(3)

STANDARDS
The wcwidth() function conforms to p1003.1-2001. The wcwidth_l() function is a Darwin extension.