]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/wcwidth.3
Import of man-pages 1.70
[thirdparty/man-pages.git] / man3 / wcwidth.3
1 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
2 .\"
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.
7 .\"
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
12 .\"
13 .TH WCWIDTH 3 1999-07-25 "GNU" "Linux Programmer's Manual"
14 .SH NAME
15 wcwidth \- determine columns needed for a wide character
16 .SH SYNOPSIS
17 .nf
18 .B #include <wchar.h>
19 .sp
20 .BI "int wcwidth(wchar_t " c );
21 .fi
22 .SH DESCRIPTION
23 The \fBwcwidth\fP function returns the number of columns needed to represent
24 the wide character \fIc\fP. If \fIc\fP is a printable wide character, the value
25 is at least 0. If \fIc\fP is L'\\0', the value is 0. Otherwise \-1 is returned.
26 .SH "RETURN VALUE"
27 The \fBwcwidth\fP function returns the number of column positions for \fIc\fP.
28 .SH "CONFORMING TO"
29 UNIX98, POSIX 1003.1-2001
30 Note that glibc before 2.2.5 used the prototype
31 .br
32 .nf
33 .BI "int wcwidth(wint_t " c );
34 .fi
35 .SH "SEE ALSO"
36 .BR iswprint (3),
37 .BR wcswidth (3)
38 .SH NOTES
39 The behaviour of \fBwcwidth\fP depends on the LC_CTYPE category of the
40 current locale.