OSDN Git Service

(split) LDP: Update original to LDP v3.50.
[linuxjm/LDP_man-pages.git] / original / man3 / wcswidth.3
1 .\" Copyright (c) Bruno Haible <haible@clisp.cons.org>
2 .\"
3 .\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA)
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.
8 .\" %%%LICENSE_END
9 .\"
10 .\" References consulted:
11 .\"   GNU glibc-2 source code and manual
12 .\"   Dinkumware C library reference http://www.dinkumware.com/
13 .\"   OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html
14 .\"
15 .TH WCSWIDTH 3  2010-09-10 "GNU" "Linux Programmer's Manual"
16 .SH NAME
17 wcswidth \- determine columns needed for a fixed-size wide-character string
18 .SH SYNOPSIS
19 .nf
20 .BR "#define _XOPEN_SOURCE" "             /* See feature_test_macros(7) */"
21 .B #include <wchar.h>
22 .sp
23 .BI "int wcswidth(const wchar_t *" s ", size_t " n );
24 .fi
25 .SH DESCRIPTION
26 The
27 .BR wcswidth ()
28 function returns the
29 number of columns needed to represent
30 the wide-character string pointed to by \fIs\fP, but at most \fIn\fP wide
31 characters.
32 If a nonprintable wide character occurs among these characters,
33 \-1 is returned.
34 .SH RETURN VALUE
35 The
36 .BR wcswidth ()
37 function
38 returns the number of column positions for the
39 wide-character string \fIs\fP, truncated to at most length \fIn\fP.
40 .SH CONFORMING TO
41 POSIX.1-2001.
42 .SH NOTES
43 The behavior of
44 .BR wcswidth ()
45 depends on the
46 .B LC_CTYPE
47 category of the
48 current locale.
49 .SH SEE ALSO
50 .BR iswprint (3),
51 .BR wcwidth (3)