1 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
3 .\" This is free documentation; you can redistribute it and/or
4 .\" modify it under the terms of the GNU General Public License as
5 .\" published by the Free Software Foundation; either version 2 of
6 .\" the License, or (at your option) any later version.
8 .\" References consulted:
9 .\" GNU glibc-2 source code and manual
10 .\" Dinkumware C library reference http://www.dinkumware.com/
11 .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
13 .TH WCWIDTH 3 2011-09-28 "GNU" "Linux Programmer's Manual"
15 wcwidth \- determine columns needed for a wide character
18 .BR "#define _XOPEN_SOURCE" " /* See feature_test_macros(7) */"
21 .BI "int wcwidth(wchar_t " c );
26 function returns the number of columns
27 needed to represent the wide character \fIc\fP.
28 If \fIc\fP is a printable wide character, the value
30 If \fIc\fP is null wide character (L\(aq\\0\(aq), the value is 0.
31 Otherwise \-1 is returned.
35 function returns the number of
36 column positions for \fIc\fP.
40 Note that glibc before 2.2.5 used the prototype
43 .BI "int wcwidth(wint_t " c );