1WCSWIDTH(P) POSIX Programmer's Manual WCSWIDTH(P)
2
3
4
6 wcswidth - number of column positions of a wide-character string
7
9 #include <wchar.h>
10
11 int wcswidth(const wchar_t *pwcs, size_t n);
12
13
15 The wcswidth() function shall determine the number of column positions
16 required for n wide-character codes (or fewer than n wide-character
17 codes if a null wide-character code is encountered before n wide-char‐
18 acter codes are exhausted) in the string pointed to by pwcs.
19
21 The wcswidth() function either shall return 0 (if pwcs points to a null
22 wide-character code), or return the number of column positions to be
23 occupied by the wide-character string pointed to by pwcs, or return -1
24 (if any of the first n wide-character codes in the wide-character
25 string pointed to by pwcs is not a printable wide-character code).
26
28 No errors are defined.
29
30 The following sections are informative.
31
33 None.
34
36 This function was removed from the final ISO/IEC 9899:1990/Amendment
37 1:1995 (E), and the return value for a non-printable wide character is
38 not specified.
39
41 None.
42
44 None.
45
47 wcwidth() , the Base Definitions volume of IEEE Std 1003.1-2001, Sec‐
48 tion 3.103, Column Position, <wchar.h>
49
51 Portions of this text are reprinted and reproduced in electronic form
52 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
53 -- Portable Operating System Interface (POSIX), The Open Group Base
54 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
55 Electrical and Electronics Engineers, Inc and The Open Group. In the
56 event of any discrepancy between this version and the original IEEE and
57 The Open Group Standard, the original IEEE and The Open Group Standard
58 is the referee document. The original Standard can be obtained online
59 at http://www.opengroup.org/unix/online.html .
60
61
62
63IEEE/The Open Group 2003 WCSWIDTH(P)