3 <<wcswidth>>---number of column positions of a wide-character string
10 int wcswidth(const wchar_t *<[pwcs]>, size_t <[n]>);
14 int wcswidth(<[pwcs]>, <[n]>)
19 The <<wcswidth>> function shall determine the number of column
20 positions required for n wide-character codes (or fewer than n
21 wide-character codes if a null wide-character code is encountered
22 before n wide-character codes are exhausted) in the string pointed
26 The <<wcswidth>> function either shall return 0 (if pwcs points to a
27 null wide-character code), or return the number of column positions
28 to be occupied by the wide-character string pointed to by pwcs, or
29 return -1 (if any of the first n wide-character codes in the
30 wide-character string pointed to by pwcs is not a printable
34 <<wcswidth>> has been introduced in the Single UNIX Specification Volume 2
35 <<wcswidth>> has been marked as extension in Single UNIX Specification Volume 3
42 _DEFUN (wcswidth
, (pwcs
, n
),
43 _CONST
wchar_t *pwcs _AND
51 if ((w
= wcwidth (*pwcs
)) < 0)
54 } while (*pwcs
++ && --n
> 0);