1WCWIDTH(P) POSIX Programmer's Manual WCWIDTH(P)
2
3
4
6 wcwidth - number of column positions of a wide-character code
7
9 #include <wchar.h>
10
11 int wcwidth(wchar_t wc);
12
13
15 The wcwidth() function shall determine the number of column positions
16 required for the wide character wc. The application shall ensure that
17 the value of wc is a character representable as a wchar_t, and is a
18 wide-character code corresponding to a valid character in the current
19 locale.
20
22 The wcwidth() function shall either return 0 (if wc is a null wide-
23 character code), or return the number of column positions to be occu‐
24 pied by the wide-character code wc, or return -1 (if wc does not corre‐
25 spond to 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 wcswidth() , the Base Definitions volume of IEEE Std 1003.1-2001,
48 <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 WCWIDTH(P)