]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/wcswidth.3
dlopen.3: Note that symbol use might keep a dlclose'd object in memory
[thirdparty/man-pages.git] / man3 / wcswidth.3
CommitLineData
fea681da
MK
1.\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
2.\"
89e3ffe9 3.\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA)
fea681da
MK
4.\" This is free documentation; you can redistribute it and/or
5.\" modify it under the terms of the GNU General Public License as
6.\" published by the Free Software Foundation; either version 2 of
7.\" the License, or (at your option) any later version.
fe382ebf 8.\" %%%LICENSE_END
fea681da
MK
9.\"
10.\" References consulted:
11.\" GNU glibc-2 source code and manual
12.\" Dinkumware C library reference http://www.dinkumware.com/
008f1ecc 13.\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
fea681da 14.\"
460495ca 15.TH WCSWIDTH 3 2015-08-08 "GNU" "Linux Programmer's Manual"
fea681da 16.SH NAME
d0f17b57 17wcswidth \- determine columns needed for a fixed-size wide-character string
fea681da
MK
18.SH SYNOPSIS
19.nf
86b91fdf 20.BR "#define _XOPEN_SOURCE" " /* See feature_test_macros(7) */"
fea681da 21.B #include <wchar.h>
68e4db0a 22.PP
fea681da
MK
23.BI "int wcswidth(const wchar_t *" s ", size_t " n );
24.fi
25.SH DESCRIPTION
60a90ecd
MK
26The
27.BR wcswidth ()
28function returns the
c13182ef 29number of columns needed to represent
40aa0db0
MK
30the wide-character string pointed to by
31.IR s ,
32but at most
33.I n
34wide
c13182ef 35characters.
24b74457 36If a nonprintable wide character occurs among these characters,
00e28710 37\-1 is returned.
47297adb 38.SH RETURN VALUE
60a90ecd
MK
39The
40.BR wcswidth ()
41function
c13182ef 42returns the number of column positions for the
40aa0db0
MK
43wide-character string
44.IR s ,
45truncated to at most length
46.IR n .
3a87fa93 47.SH ATTRIBUTES
187b7c22
PH
48For an explanation of the terms used in this section, see
49.BR attributes (7).
50.TS
51allbox;
52lb lb lb
53l l l.
54Interface Attribute Value
55T{
3a87fa93 56.BR wcswidth ()
187b7c22
PH
57T} Thread safety MT-Safe locale
58.TE
47297adb 59.SH CONFORMING TO
38a15484 60POSIX.1-2001, POSIX.1-2008.
fea681da 61.SH NOTES
d9bfdb9c 62The behavior of
60a90ecd 63.BR wcswidth ()
1274071a
MK
64depends on the
65.B LC_CTYPE
66category of the
fea681da 67current locale.
47297adb 68.SH SEE ALSO
e37e3282
MK
69.BR iswprint (3),
70.BR wcwidth (3)