1WCWIDTH(3)                 Linux Programmer's Manual                WCWIDTH(3)
2
3
4

NAME

6       wcwidth - determine columns needed for a wide character
7

SYNOPSIS

9       #define _XOPEN_SOURCE       /* See feature_test_macros(7) */
10       #include <wchar.h>
11
12       int wcwidth(wchar_t c);
13

DESCRIPTION

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

RETURN VALUE

21       The wcwidth() function returns the number of column positions for c.
22

ATTRIBUTES

24       For  an  explanation  of  the  terms  used   in   this   section,   see
25       attributes(7).
26
27       ┌──────────┬───────────────┬────────────────┐
28Interface Attribute     Value          
29       ├──────────┼───────────────┼────────────────┤
30wcwidth() │ Thread safety │ MT-Safe locale │
31       └──────────┴───────────────┴────────────────┘

CONFORMING TO

33       POSIX.1-2001, POSIX.1-2008.
34
35       Note that glibc before 2.2.5 used the prototype
36
37       int wcwidth(wint_t c);
38

NOTES

40       The  behavior of wcwidth() depends on the LC_CTYPE category of the cur‐
41       rent locale.
42

SEE ALSO

44       iswprint(3), wcswidth(3)
45

COLOPHON

47       This page is part of release 4.15 of the Linux  man-pages  project.   A
48       description  of  the project, information about reporting bugs, and the
49       latest    version    of    this    page,    can     be     found     at
50       https://www.kernel.org/doc/man-pages/.
51
52
53
54GNU                               2017-09-15                        WCWIDTH(3)
Impressum