OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / original / man3 / wcswidth.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 WCSWIDTH 3  2007-07-26 "GNU" "Linux Programmer's Manual"
14 .SH NAME
15 wcswidth \- determine columns needed for a fixed-size wide-character string
16 .SH SYNOPSIS
17 .nf
18 .B #define _XOPEN_SOURCE
19 .B #include <wchar.h>
20 .sp
21 .BI "int wcswidth(const wchar_t *" s ", size_t " n );
22 .fi
23 .SH DESCRIPTION
24 The
25 .BR wcswidth ()
26 function returns the
27 number of columns needed to represent
28 the wide-character string pointed to by \fIs\fP, but at most \fIn\fP wide
29 characters.
30 If a nonprintable wide character occurs among these characters,
31 \-1 is returned.
32 .SH "RETURN VALUE"
33 The
34 .BR wcswidth ()
35 function
36 returns the number of column positions for the
37 wide-character string \fIs\fP, truncated to at most length \fIn\fP.
38 .SH "CONFORMING TO"
39 POSIX.1-2001.
40 .SH NOTES
41 The behavior of
42 .BR wcswidth ()
43 depends on the
44 .B LC_CTYPE
45 category of the
46 current locale.
47 .SH "SEE ALSO"
48 .BR iswprint (3),
49 .BR wcwidth (3)