OSDN Git Service

(split) Apply minor changes from v3.32 to v3.35 in the upstream.
[linuxjm/LDP_man-pages.git] / draft / man3 / wcsnlen.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 .\" About this Japanese page, please contact to JM Project <JM@linux.or.jp>
14 .\" Translated Tue Oct 19 02:22:50 JST 1999
15 .\"           by FUJIWARA Teruyoshi <fujiwara@linux.or.jp>
16 .\"
17 .TH WCSNLEN 3  2011-10-01 "GNU" "Linux Programmer's Manual"
18 .\"O .SH NAME
19 .SH Ì¾Á°
20 .\"O wcsnlen \- determine the length of a fixed-size wide-character string
21 wcsnlen \- ¸ÇÄêĹ¤Î¥ï¥¤¥Éʸ»úʸ»úÎó¤ÎŤµ¤òµá¤á¤ë
22 .\"O .SH SYNOPSIS
23 .SH ½ñ¼°
24 .nf
25 .B #include <wchar.h>
26 .sp
27 .BI "size_t wcsnlen(const wchar_t *" s ", size_t " maxlen );
28 .fi
29 .sp
30 .in -4n
31 .\"O Feature Test Macro Requirements for glibc (see
32 .\"O .BR feature_test_macros (7)):
33 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
34 .RB ( feature_test_macros (7)
35 »²¾È):
36 .in
37 .sp
38 .BR wcsncasecmp ():
39 .PD 0
40 .ad l
41 .RS 4
42 .TP 4
43 .\"O Since glibc 2.10:
44 glibc 2.10 °Ê¹ß:
45 _XOPEN_SOURCE\ >=\ 700 || _POSIX_C_SOURCE\ >=\ 200809L
46 .TP
47 .\"O Before glibc 2.10:
48 glibc 2.10 ¤è¤êÁ°:
49 _GNU_SOURCE
50 .RE
51 .ad
52 .PD
53 .\"O .SH DESCRIPTION
54 .SH ÀâÌÀ
55 .\"O The
56 .\"O .BR wcsnlen ()
57 .\"O function is the wide-character equivalent
58 .\"O of the
59 .\"O .BR strnlen (3)
60 .\"O function.
61 .\"O It returns the number of wide-characters in the string pointed to by
62 .\"O \fIs\fP, not including the terminating null wide character (L\(aq\\0\(aq),
63 .\"O but at most
64 .\"O \fImaxlen\fP
65 .\"O wide characters (note: this parameter is not a byte count).
66 .\"O In doing this,
67 .\"O .BR wcsnlen ()
68 .\"O looks only at the first \fImaxlen\fP
69 .\"O wide characters at \fIs\fP and never beyond \fIs+maxlen\fP.
70 .BR wcsnlen ()
71 ´Ø¿ô¤Ï¡¢
72 .BR strnlen (3)
73 ´Ø¿ô¤ËÂбþ¤¹¤ë¥ï¥¤¥Éʸ»ú´Ø¿ô¤Ç¤¢¤ë¡£
74 ¤³¤Î´Ø¿ô¤Ï¡¢\fIs\fP ¤¬»Ø¤¹Ê¸»úÎóÃæ¤Î¥ï¥¤¥Éʸ»ú¤Î¿ô¤òÊÖ¤¹¤¬¡¢
75 ÊÖ¤µ¤ì¤ë¤Î¤Ï¥ï¥¤¥Éʸ»ú¤ÇºÇÂç \fImaxlen\fP Ê¸»ú¤Þ¤Ç¤Ç¤¢¤ë
76 (¤³¤Î¥Ñ¥é¥á¡¼¥¿¤Ï¥Ð¥¤¥È¿ô¤Ç¤Ï¤Ê¤¤ÅÀ¤ËÃí°Õ)¡£
77 ¤Þ¤¿¡¢½ªÃ¼¤Î NULL ¥ï¥¤¥Éʸ»ú (L\(aq\\0\(aq) ¤Ï´Þ¤Þ¤Ê¤¤¡£
78 ¤³¤ì¤ò¹Ô¤¦ºÝ¤Ë¤Ï¡¢
79 .BR wcsnlen ()
80 ¤Ï \fIs\fP ¤¬»Ø¤¹¥ï¥¤¥Éʸ»úÎó¤ÎºÇ½é¤Î
81 \fImaxlen\fP Ê¸»ú¤·¤«¸«¤º¡¢·è¤·¤Æ \fIs+maxlen\fP Ê¸»ú¤òĶ¤¨¤Æʸ»úÎó¤ò
82 »²¾È¤¹¤ë¤³¤È¤Ï¤Ê¤¤¡£
83 .\"O .SH "RETURN VALUE"
84 .SH ÊÖ¤êÃÍ
85 .\"O The
86 .\"O .BR wcsnlen ()
87 .\"O function returns \fIwcslen(s)\fP, if that is less than
88 .\"O \fImaxlen\fP, or \fImaxlen\fP if there is no null wide character among the
89 .\"O first \fImaxlen\fP wide characters pointed to by \fIs\fP.
90 .BR wcsnlen ()
91 ´Ø¿ô¤Ï¡¢\fIwcslen(s)\fP ¤ÎÃͤ¬ \fImaxlen\fP ¤è¤ê¾®¤µ¤±¤ì
92 ¤Ð \fIwcslen(s)\fP ¤òÊÖ¤¹¡£¤¢¤ë¤¤¤Ï¡¢\fIs\fP ¤¬»Ø¤¹¥ï¥¤¥Éʸ»úÎóÃæ¤Î
93 ºÇ½é¤Î \fImaxlen\fP Ê¸»ú¤Ë NULL ¥ï¥¤¥Éʸ»ú¤¬´Þ¤Þ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð
94 \fImaxlen\fP ¤òÊÖ¤¹¡£
95 .\"O .SH VERSIONS
96 .SH ¥Ð¡¼¥¸¥ç¥ó
97 .\"O The
98 .\"O .BR wcsnlen ()
99 .\"O function is provided in glibc since version 2.1.
100 .BR wcsnlen ()
101 ´Ø¿ô¤Ï glibc ¥Ð¡¼¥¸¥ç¥ó 2.1 °Ê¹ß¤ÇÄ󶡤µ¤ì¤Æ¤¤¤ë¡£
102 .\"O .SH "CONFORMING TO"
103 .SH ½àµò
104 POSIX.1-2008.
105 .\"O .SH "SEE ALSO"
106 .SH ´ØÏ¢¹àÌÜ
107 .BR strnlen (3),
108 .BR wcslen (3)