OSDN Git Service

2a48d5d26e43c6882b42495b555f9d89a66e684f
[linuxjm/LDP_man-pages.git] / draft / man3 / strnlen.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 .\"
13 .\"*******************************************************************
14 .\"
15 .\" This file was generated with po4a. Translate the source file.
16 .\"
17 .\"*******************************************************************
18 .TH STRNLEN 3 2012\-05\-10 GNU "Linux Programmer's Manual"
19 .SH 名前
20 strnlen \- 固定長の文字列の長さを調べる
21 .SH 書式
22 .nf
23 \fB#include <string.h>\fP
24 .sp
25 \fBsize_t strnlen(const char *\fP\fIs\fP\fB, size_t \fP\fImaxlen\fP\fB);\fP
26 .fi
27 .sp
28 .in -4n
29 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
30 .in
31 .sp
32 \fBstrnlen\fP():
33 .PD 0
34 .ad l
35 .RS 4
36 .TP  4
37 glibc 2.10 以降:
38 _XOPEN_SOURCE\ >=\ 700 || _POSIX_C_SOURCE\ >=\ 200809L
39 .TP 
40 glibc 2.10 より前:
41 _GNU_SOURCE
42 .RE
43 .ad
44 .PD
45 .SH 説明
46 The \fBstrnlen\fP()  function returns the number of bytes in the string pointed
47 to by \fIs\fP, excluding the terminating null byte (\(aq\e0\(aq), but at most
48 \fImaxlen\fP.  In doing this, \fBstrnlen\fP()  looks only at the first \fImaxlen\fP
49 bytes at \fIs\fP and never beyond \fIs+maxlen\fP.
50 .SH 返り値
51 \fBstrnlen\fP() 関数は \fImaxlen\fP 以下ならば \fIstrlen(s)\fP と同じ値を返す。
52 \fIs\fP の指す文字列が最大 \fImaxlen\fP バイトまでに NULL バイト
53 (\(aq\e0\(aq) 文字を含まない場合には \fImaxlen\fP を返す。
54 .SH 準拠
55 POSIX.1\-2008.
56 .SH 関連項目
57 \fBstrlen\fP(3)
58 .SH この文書について
59 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部
60 である。プロジェクトの説明とバグ報告に関する情報は
61 http://www.kernel.org/doc/man\-pages/ に書かれている。