OSDN Git Service

(split) Move Japanese translation histories after original history sections.
[linuxjm/LDP_man-pages.git] / draft / man3 / index.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" References consulted:
24 .\"     Linux libc source code
25 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
26 .\"     386BSD man pages
27 .\" Modified Mon Apr 12 12:54:34 1993, David Metcalfe
28 .\" Modified Sat Jul 24 19:13:52 1993, Rik Faith (faith@cs.unc.edu)
29 .\"
30 .\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
31 .\"     all rights reserved.
32 .\" Translated Fri Dec 12 12:41:35 JST 1997
33 .\"     by HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
34 .\"
35 .TH INDEX 3 2010-09-20 "GNU" "Linux Programmer's Manual"
36 .\"O .SH NAME
37 .SH Ì¾Á°
38 .\"O index, rindex \- locate character in string
39 index, rindex \- Ê¸»úÎóÃæ¤Îʸ»ú¤Î°ÌÃÖ¤ò¼¨¤¹
40 .\"O .SH SYNOPSIS
41 .SH ½ñ¼°
42 .nf
43 .B #include <strings.h>
44 .sp
45 .BI "char *index(const char *" s ", int " c );
46 .sp
47 .BI "char *rindex(const char *" s ", int " c );
48 .fi
49 .\"O .SH DESCRIPTION
50 .SH ÀâÌÀ
51 .\"O The
52 .\"O .BR index ()
53 .\"O function returns a pointer to the first occurrence
54 .\"O of the character \fIc\fP in the string \fIs\fP.
55 .BR index ()
56 ´Ø¿ô¤Ï¡¢Ê¸»úÎó \fIs\fP Ãæ¤ËºÇ½é¤Ëʸ»ú \fIc\fP ¤¬
57 ¸½¤ì¤¿°ÌÃ֤ؤΥݥ¤¥ó¥¿¤òÊÖ¤¹¡£
58 .PP
59 .\"O The
60 .\"O .BR rindex ()
61 .\"O function returns a pointer to the last occurrence
62 .\"O of the character \fIc\fP in the string \fIs\fP.
63 .BR rindex ()
64 ´Ø¿ô¤Ï¡¢Ê¸»úÎó \fIs\fP Ãæ¤ËºÇ¸å¤Ëʸ»ú \fIc\fP ¤¬
65 ¸½¤ì¤¿°ÌÃ֤ؤΥݥ¤¥ó¥¿¤òÊÖ¤¹¡£
66 .PP
67 .\"O The terminating NULL character is considered to be a part of the
68 .\"O strings.
69 ʸ»úÎó¤ò½ªÃ¼¤¹¤ë NULL Ê¸»ú¤Ï¡¢Ê¸»úÎó¤Î°ìÉô¤È¤ß¤Ê¤µ¤ì¤ë¡£
70 .\"O .SH "RETURN VALUE"
71 .SH ÊÖ¤êÃÍ
72 .\"O The
73 .\"O .BR index ()
74 .\"O and
75 .\"O .BR rindex ()
76 .\"O functions return a pointer to
77 .\"O the matched character or NULL if the character is not found.
78 .BR index ()
79 ¤È
80 .BR rindex ()
81 ´Ø¿ô¤Ï¡¢°ìÃפ·¤¿Ê¸»ú¤Ø¤Î¥Ý¥¤¥ó¥¿¤«¡¢
82 ¤â¤·Ê¸»ú¤¬¸«¤Ä¤«¤é¤Ê¤¤¾ì¹ç¤Ï NULL ¤òÊÖ¤¹¡£
83 .\"O .SH "CONFORMING TO"
84 .SH ½àµò
85 .\"O 4.3BSD; marked as LEGACY in POSIX.1-2001.
86 4.3BSD;
87 POSIX.1-2001 ¤Ç¤Ï¡Ö²áµî¤Î̾»Ä (LEGACY)¡×¤È°ÌÃÖÉÕ¤±¤é¤ì¤Æ¤¤¤ë¡£
88 .\"O POSIX.1-2008 removes the specifications of
89 .\"O .BR index ()
90 .\"O and
91 .\"O .BR rindex (),
92 .\"O recommending
93 .\"O .BR strchr (3)
94 .\"O and
95 .\"O .BR strrchr (3)
96 .\"O instead.
97 POSIX.1-2008 ¤Ç¤Ï
98 .BR index ()
99 ¤È
100 .BR rindex ()
101 ¤Î»ÅÍͤ¬ºï½ü¤µ¤ì¤Æ¤¤¤ë¡£
102 Âå¤ï¤ê¤Ë¡¢
103 .BR strchr (3)
104 ¤È
105 .BR strrchr (3)
106 ¤Î»ÈÍѤ¬¿ä¾©¤µ¤ì¤Æ¤¤¤ë¡£
107 .\"O .SH "SEE ALSO"
108 .SH ´ØÏ¢¹àÌÜ
109 .BR memchr (3),
110 .BR strchr (3),
111 .BR string (3),
112 .BR strpbrk (3),
113 .BR strrchr (3),
114 .BR strsep (3),
115 .BR strspn (3),
116 .BR strstr (3),
117 .BR strtok (3)