1WCSWIDTH(3) Linux Programmer's Manual WCSWIDTH(3)
2
3
4
6 wcswidth - determine columns needed for a fixed-size wide character
7 string
8
10 #include <wchar.h>
11
12 int wcswidth(const wchar_t *s, size_t n);
13
15 The wcswidth() function returns the number of columns needed to repre‐
16 sent the wide-character string pointed to by s, but at most n wide
17 characters. If a non-printable wide character occurs among these char‐
18 acters, -1 is returned.
19
21 The wcswidth() function returns the number of column positions for the
22 wide-character string s, truncated to at most length n.
23
25 POSIX.1-2001.
26
28 iswprint(3), wcwidth(3)
29
31 The behaviour of wcswidth() depends on the LC_CTYPE category of the
32 current locale.
33
34
35
36GNU 1999-07-25 WCSWIDTH(3)