1WCWIDTH(3) Linux Programmer's Manual WCWIDTH(3)
2
3
4
6 wcwidth - determine columns needed for a wide character
7
9 #define _XOPEN_SOURCE /* See feature_test_macros(7) */
10 #include <wchar.h>
11
12 int wcwidth(wchar_t c);
13
15 The wcwidth() function returns the number of columns needed to repre‐
16 sent the wide character c. If c is a printable wide character, the
17 value is at least 0. If c is null wide character (L'\0'), the value is
18 0. Otherwise -1 is returned.
19
21 The wcwidth() function returns the number of column positions for c.
22
24 POSIX.1-2001.
25
26 Note that glibc before 2.2.5 used the prototype
27 int wcwidth(wint_t c);
28
30 The behavior of wcwidth() depends on the LC_CTYPE category of the cur‐
31 rent locale.
32
34 iswprint(3), wcswidth(3)
35
37 This page is part of release 3.53 of the Linux man-pages project. A
38 description of the project, and information about reporting bugs, can
39 be found at http://www.kernel.org/doc/man-pages/.
40
41
42
43GNU 2011-09-28 WCWIDTH(3)