OSDN Git Service

44fdebb2f83fc51b3ad17cc3b4ca90b3f395bf22
[linuxjm/LDP_man-pages.git] / draft / man3 / strcmp.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\"
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" %%%LICENSE_END
24 .\"
25 .\" References consulted:
26 .\"     Linux libc source code
27 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
28 .\"     386BSD man pages
29 .\" Modified Sat Jul 24 18:08:52 1993 by Rik Faith (faith@cs.unc.edu)
30 .\" Modified 2001-08-31, aeb
31 .\"
32 .\"*******************************************************************
33 .\"
34 .\" This file was generated with po4a. Translate the source file.
35 .\"
36 .\"*******************************************************************
37 .TH STRCMP 3 2012\-11\-25 "" "Linux Programmer's Manual"
38 .SH 名前
39 strcmp, strncmp \- 二つの文字列を比べる
40 .SH 書式
41 .nf
42 \fB#include <string.h>\fP
43 .sp
44 \fBint strcmp(const char *\fP\fIs1\fP\fB, const char *\fP\fIs2\fP\fB);\fP
45 .sp
46 \fBint strncmp(const char *\fP\fIs1\fP\fB, const char *\fP\fIs2\fP\fB, size_t \fP\fIn\fP\fB);\fP
47 .fi
48 .SH 説明
49 \fBstrcmp\fP()  関数は二つの文字列 \fIs1\fP と \fIs2\fP を較べる。 この関数は、 \fIs1\fP が \fIs2\fP に較べて
50 1)小さい、2)等しい、3)大きい場合に、 ゼロよりも 1)小さい、2)等しい、3)大きい整数を返す。
51 .PP
52 The \fBstrncmp\fP()  function is similar, except it compares the only first (at
53 most)  \fIn\fP bytes of \fIs1\fP and \fIs2\fP.
54 .SH 返り値
55 \fBstrcmp\fP()  関数と \fBstrncmp\fP()  関数は整数を返す。
56 この整数は、ゼロよりも、1)小さい、2)等しい、3)大きいのいずれかである。 それぞれは、\fIs1\fP(または、この文字列の最初の \fIn\fP バイト)が
57 \fIs2\fP よりも、1)小さい、2)等しい、3)大きいに対応している。
58 .SH 準拠
59 SVr4, 4.3BSD, C89, C99.
60 .SH 関連項目
61 \fBbcmp\fP(3), \fBmemcmp\fP(3), \fBstrcasecmp\fP(3), \fBstrcoll\fP(3), \fBstring\fP(3),
62 \fBstrncasecmp\fP(3), \fBstrverscmp\fP(3), \fBwcscmp\fP(3), \fBwcsncmp\fP(3)
63 .SH この文書について
64 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部
65 である。プロジェクトの説明とバグ報告に関する情報は
66 http://www.kernel.org/doc/man\-pages/ に書かれている。