]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/wcwidth.3
All pages: Remove the 5th argument to .TH
[thirdparty/man-pages.git] / man3 / wcwidth.3
CommitLineData
fea681da
MK
1.\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
2.\"
e4a74ca8 3.\" SPDX-License-Identifier: GPL-2.0-or-later
fea681da
MK
4.\"
5.\" References consulted:
6.\" GNU glibc-2 source code and manual
7.\" Dinkumware C library reference http://www.dinkumware.com/
008f1ecc 8.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
fea681da 9.\"
45186a5d 10.TH WCWIDTH 3 2021-03-22 "Linux "Linux man-pages (unreleased)"
fea681da
MK
11.SH NAME
12wcwidth \- determine columns needed for a wide character
e37caa91
AC
13.SH LIBRARY
14Standard C library
8fc3b2cf 15.RI ( libc ", " \-lc )
fea681da
MK
16.SH SYNOPSIS
17.nf
b80f966b 18.BR "#define _XOPEN_SOURCE" " /* See feature_test_macros(7) */"
fea681da 19.B #include <wchar.h>
68e4db0a 20.PP
fea681da
MK
21.BI "int wcwidth(wchar_t " c );
22.fi
23.SH DESCRIPTION
60a90ecd
MK
24The
25.BR wcwidth ()
26function returns the number of columns
e4a0d6cb
MK
27needed to represent the wide character
28.IR c .
29If
30.I c
31is a printable wide character, the value
1c44bd5b 32is at least 0.
e4a0d6cb
MK
33If
34.I c
d1a71985 35is null wide character (L\(aq\e0\(aq), the value is 0.
2b9b829d 36Otherwise, \-1 is returned.
47297adb 37.SH RETURN VALUE
60a90ecd
MK
38The
39.BR wcwidth ()
40function returns the number of
e4a0d6cb
MK
41column positions for
42.IR c .
b2e49efd 43.SH ATTRIBUTES
d3f9c010
PH
44For an explanation of the terms used in this section, see
45.BR attributes (7).
c466875e
MK
46.ad l
47.nh
d3f9c010
PH
48.TS
49allbox;
c466875e 50lbx lb lb
d3f9c010
PH
51l l l.
52Interface Attribute Value
53T{
b2e49efd 54.BR wcwidth ()
d3f9c010
PH
55T} Thread safety MT-Safe locale
56.TE
c466875e
MK
57.hy
58.ad
59.sp 1
3113c7f3 60.SH STANDARDS
19bf752c 61POSIX.1-2001, POSIX.1-2008.
847e0d88 62.PP
fea681da 63Note that glibc before 2.2.5 used the prototype
a2b7a144 64.PP
fea681da
MK
65.nf
66.BI "int wcwidth(wint_t " c );
67.fi
fea681da 68.SH NOTES
d9bfdb9c 69The behavior of
60a90ecd 70.BR wcwidth ()
1274071a
MK
71depends on the
72.B LC_CTYPE
73category of the
fea681da 74current locale.
47297adb 75.SH SEE ALSO
0a90178c 76.BR iswprint (3),
0a4f8b7b 77.BR wcswidth (3)