OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man3 / strnlen.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 .\"
11 .\" Japanese Version Copyright (c) 1999 HANATAKA Shinya
12 .\"         all rights reserved.
13 .\" Translated Tue Jan 11 00:55:48 JST 2000
14 .\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
15 .\"
16 .TH STRNLEN 3 1999-07-25 "GNU" "Linux Programmer's Manual"
17 .\"O .SH NAME
18 .SH Ì¾Á°
19 .\"O strnlen \- determine the length of a fixed-size string
20 strnlen \- ¸ÇÄêŤÎʸ»úÎó¤ÎŤµ¤òÄ´¤Ù¤ë
21 .\"O .SH SYNOPSIS
22 .SH ½ñ¼°
23 .nf
24 .B #define _GNU_SOURCE
25 .sp
26 .B #include <string.h>
27 .sp
28 .BI "size_t strnlen(const char *" s ", size_t " maxlen );
29 .fi
30 .\"O .SH DESCRIPTION
31 .SH ÀâÌÀ
32 .\"O The
33 .\"O .BR strnlen ()
34 .\"O function returns the number of characters in the string
35 .\"O pointed to by \fIs\fP, not including the terminating \(aq\\0\(aq character,
36 .\"O but at most \fImaxlen\fP.
37 .\"O In doing this,
38 .\"O .BR strnlen ()
39 .\"O looks only at the first
40 .\"O \fImaxlen\fP characters at \fIs\fP and never beyond \fIs+maxlen\fP.
41 .BR strnlen ()
42 ´Ø¿ô¤Ï \fIs\fP ¤¬»Ø¤¹Ê¸»úÎó¤ÎŤµ¤ò¥Ð¥¤¥È¿ô¤ÇÊÖ¤¹¡£
43 Ťµ¤Ë¤Ï½ªÃ¼¤Î \(aq\\0\(aq Ê¸»ú¤ò´Þ¤Þ¤Ê¤¤¡£
44 ¤Þ¤¿Ä¹¤µ¤ÏºÇÂç¤Ç \fImaxlen\fP ¤Þ¤Ç¤Ç¤¢¤ê¡¢
45 .BR strnlen ()
46 ¤Ï \fIs\fP ¤ÎºÇ½é¤Î \fImaxlen\fP ¥Ð¥¤¥È¤Î¤ß¤ò¸¡ºº¤·
47 \fIs+maxlen\fP ¤è¤êÀè¤ò¸¡ºº¤¹¤ë¤³¤È¤Ï¤Ê¤¤¡£
48 .\"O .SH "RETURN VALUE"
49 .SH ÊÖ¤êÃÍ
50 .\"O The
51 .\"O .BR strnlen ()
52 .\"O function returns \fIstrlen(s)\fP, if that is less than
53 .\"O \fImaxlen\fP, or \fImaxlen\fP
54 .\"O if there is no \(aq\\0\(aq character among the first
55 .\"O \fImaxlen\fP characters pointed to by \fIs\fP.
56 .BR strnlen ()
57 ´Ø¿ô¤Ï \fImaxlen\fP °Ê²¼¤Ê¤é¤Ð \fIstrlen(s)\fP ¤ÈƱ¤¸
58 ÃͤòÊÖ¤¹¡£\fIs\fP ¤Î»Ø¤¹Ê¸»úÎ󤬺ÇÂç \fImaxlen\fP ¥Ð¥¤¥È¤Þ¤Ç¤Ë
59 \(aq\\0\(aq Ê¸»ú¤ò´Þ¤Þ¤Ê¤¤¾ì¹ç¤Ë¤Ï \fImaxlen\fP ¤òÊÖ¤¹¡£
60 .\"O .SH "CONFORMING TO"
61 .SH ½àµò
62 .\"O This function is a GNU extension.
63 ¤³¤Î´Ø¿ô¤Ï GNU ¤Î³ÈÄ¥¤Ç¤¢¤ë¡£
64 .\"O .SH "SEE ALSO"
65 .SH ´ØÏ¢¹àÌÜ
66 .BR strlen (3),
67 .BR feature_test_macros (7)