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
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 L'\0', the value is 0. Otherwise -1 is
18       returned.
19

RETURN VALUE

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

CONFORMING TO

24       POSIX.1-2001.
25
26       Note that glibc before 2.2.5 used the prototype
27       int wcwidth(wint_t c);
28

NOTES

30       The behaviour of wcwidth() depends on the LC_CTYPE category of the cur‐
31       rent locale.
32

SEE ALSO

34       iswprint(3), wcswidth(3), feature_test_macros(7)
35
36
37
38GNU                               1999-07-25                        WCWIDTH(3)
Impressum