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

NAME

6       wcswidth  -  determine  columns  needed for a fixed-size wide-character
7       string
8

SYNOPSIS

10       #define _XOPEN_SOURCE             /* See feature_test_macros(7) */
11       #include <wchar.h>
12
13       int wcswidth(const wchar_t *s, size_t n);
14

DESCRIPTION

16       The wcswidth() function returns the number of columns needed to  repre‐
17       sent  the  wide-character  string  pointed  to by s, but at most n wide
18       characters.  If a nonprintable wide character occurs among these  char‐
19       acters, -1 is returned.
20

RETURN VALUE

22       The  wcswidth() function returns the number of column positions for the
23       wide-character string s, truncated to at most length n.
24

ATTRIBUTES

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

CONFORMING TO

35       POSIX.1-2001, POSIX.1-2008.
36

NOTES

38       The behavior of wcswidth() depends on the LC_CTYPE category of the cur‐
39       rent locale.
40

SEE ALSO

42       iswprint(3), wcwidth(3)
43

COLOPHON

45       This page is part of release 5.02 of the Linux  man-pages  project.   A
46       description  of  the project, information about reporting bugs, and the
47       latest    version    of    this    page,    can     be     found     at
48       https://www.kernel.org/doc/man-pages/.
49
50
51
52GNU                               2015-08-08                       WCSWIDTH(3)
Impressum