1 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
3 .\" SPDX-License-Identifier: GPL-2.0-or-later
5 .\" References consulted:
6 .\" GNU glibc-2 source code and manual
7 .\" Dinkumware C library reference http://www.dinkumware.com/
8 .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
10 .TH wcwidth 3 (date) "Linux man-pages (unreleased)"
12 wcwidth \- determine columns needed for a wide character
15 .RI ( libc ", " \-lc )
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
31 is a printable wide character, the value
35 is null wide character (L\(aq\e0\(aq), the value is 0.
36 Otherwise, \-1 is returned.
40 function returns the number of
44 For an explanation of the terms used in this section, see
52 Interface Attribute Value
55 T} Thread safety MT-Safe locale
61 POSIX.1-2001, POSIX.1-2008.
63 Note that glibc before 2.2.5 used the prototype
66 .BI "int wcwidth(wint_t " c );