OSDN Git Service

(split) LDP: Restore and add Copyrights for draft pages
[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 .\"
19 .\" Japanese Version Copyright (c) 1999 HANATAKA Shinya
20 .\"         all rights reserved.
21 .\" Translated Tue Jan 11 00:55:48 JST 2000
22 .\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
23 .\"
24 .TH STRNLEN 3 2012\-05\-10 GNU "Linux Programmer's Manual"
25 .SH 名前
26 strnlen \- 固定長の文字列の長さを調べる
27 .SH 書式
28 .nf
29 \fB#include <string.h>\fP
30 .sp
31 \fBsize_t strnlen(const char *\fP\fIs\fP\fB, size_t \fP\fImaxlen\fP\fB);\fP
32 .fi
33 .sp
34 .in -4n
35 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
36 .in
37 .sp
38 \fBstrnlen\fP():
39 .PD 0
40 .ad l
41 .RS 4
42 .TP  4
43 glibc 2.10 以降:
44 _XOPEN_SOURCE\ >=\ 700 || _POSIX_C_SOURCE\ >=\ 200809L
45 .TP 
46 glibc 2.10 より前:
47 _GNU_SOURCE
48 .RE
49 .ad
50 .PD
51 .SH 説明
52 \fBstrnlen\fP() 関数は \fIs\fP が指す文字列の長さをバイト数で返す。 長さには
53 終端の NULL バイト (\(aq\e0\(aq) は含まない。 また長さは最大で
54 \fImaxlen\fP までであり、 \fBstrnlen\fP() は \fIs\fP の最初の \fImaxlen\fP バイト
55 のみを検査し \fIs+maxlen\fP より先を検査することはない。
56 .SH 返り値
57 \fBstrnlen\fP() 関数は \fImaxlen\fP 以下ならば \fIstrlen(s)\fP と同じ値を返す。
58 \fIs\fP の指す文字列が最大 \fImaxlen\fP バイトまでに NULL バイト
59 (\(aq\e0\(aq) 文字を含まない場合には \fImaxlen\fP を返す。
60 .SH 準拠
61 POSIX.1\-2008.
62 .SH 関連項目
63 \fBstrlen\fP(3)
64 .SH この文書について
65 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部
66 である。プロジェクトの説明とバグ報告に関する情報は
67 http://www.kernel.org/doc/man\-pages/ に書かれている。