OpenBSD manual page server

Manual Page Search Parameters

WCWIDTH(3) Library Functions Manual WCWIDTH(3)

wcwidthnumber of column positions of a wide-character code

#include <wchar.h>

int
wcwidth(wchar_t wc);

The () function determines the number of column positions required to display the wide character wc.

The wcwidth() function returns 0 if the wc argument is the NUL wide character (L'\0'), -1 if wc is not printable, or otherwise it returns the number of column positions the character occupies, which may be 0, 1, or 2.

iswprint(3), wcswidth(3)

The wcwidth() function conforms to IEEE Std 1003.1-2001 (“POSIX.1”).

September 2, 2016 OpenBSD-7.6