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
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 non-printable 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

CONFORMING TO

26       POSIX.1-2001.
27

NOTES

29       The behavior of wcswidth() depends on the LC_CTYPE category of the cur‐
30       rent locale.
31

SEE ALSO

33       iswprint(3), wcwidth(3)
34

COLOPHON

36       This  page  is  part of release 3.22 of the Linux man-pages project.  A
37       description of the project, and information about reporting  bugs,  can
38       be found at http://www.kernel.org/doc/man-pages/.
39
40
41
42GNU                               2007-07-26                       WCSWIDTH(3)
Impressum