OSDN Git Service

Convert release and draft pages to UTF-8.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man3 / strsep.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 Sat Jul 24 18:00:10 1993 by Rik Faith (faith@cs.unc.edu)
28 .\" Modified Mon Jan 20 12:04:18 1997 by Andries Brouwer (aeb@cwi.nl)
29 .\" Modified Tue Jan 23 20:23:07 2001 by Andries Brouwer (aeb@cwi.nl)
30 .\"
31 .\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
32 .\"     all rights reserved.
33 .\" Translated Tue Dec 16 10:06:16 JST 1997
34 .\"     by HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
35 .\" Updated Tue Apr 10 11:19:58 JST 2001 by Kentaro Shirakata <argrath@ub32.org>
36 .\" Updated 2009-02-12 by Kentaro Shirakata <argrath@ub32.org>
37 .\"
38 .\" WORD:       delimiter       区切り文字
39 .\"
40 .TH STRSEP 3  2011-09-28 "GNU" "Linux Programmer's Manual"
41 .\"O .SH NAME
42 .SH 名前
43 .\"O strsep \- extract token from string
44 strsep \- 文字列からトークンを取り出す
45 .\"O .SH SYNOPSIS
46 .SH 書式
47 .nf
48 .B #include <string.h>
49 .sp
50 .BI "char *strsep(char **" stringp ", const char *" delim );
51 .fi
52 .sp
53 .in -4n
54 .\"O Feature Test Macro Requirements for glibc (see
55 .\"O .BR feature_test_macros (7)):
56 glibc 向けの機能検査マクロの要件
57 .RB ( feature_test_macros (7)
58 参照):
59 .in
60 .sp
61 .BR strsep ():
62 _BSD_SOURCE
63 .\"O .SH DESCRIPTION
64 .SH 説明
65 .\"O If \fI*stringp\fP is NULL, the
66 .\"O .BR strsep ()
67 .\"O function returns NULL
68 .\"O and does nothing else.
69 .\"O Otherwise, this function finds the first token
70 .\"O in the string \fI*stringp\fP, where tokens
71 .\"O are delimited by symbols in the string \fIdelim\fP.
72 \fI*stringp\fP が NULL の場合、
73 .BR strsep ()
74 関数は何もせずに NULL を返す。
75 さもなければ、文字列 \fIstringp\fP を
76 \fIdelim\fP に含まれる文字で区切った
77 トークンのうち最初のものを返す。
78 .\"O This token is terminated by overwriting the delimiter
79 .\"O with a null byte (\(aq\\0\(aq)
80 .\"O and \fI*stringp\fP is updated to point past the token.
81 トークンは、区切り文字を NULL バイト (\(aq\\0\(aq) で上書きすることで
82 終端される。
83 \fI*stringp\fP は切り出されたトークンの次の位置を示すように更新される。
84 .\"O In case no delimiter was found, the token is taken to be
85 .\"O the entire string \fI*stringp\fP, and \fI*stringp\fP is made NULL.
86 区切り文字が見つからない場合、\fI*stringp\fP 文字列全体がトークンとして
87 扱われ、\fI*stringp\fP は NULL となる。
88 .\"O .SH "RETURN VALUE"
89 .SH 返り値
90 .\"O The
91 .\"O .BR strsep ()
92 .\"O function returns a pointer to the token,
93 .\"O that is, it returns the original value of \fI*stringp\fP.
94 .BR strsep ()
95 関数は、トークンへのポインタを返す。
96 つまり、元の \fI*stringp\fP の値を返す。
97 .\"O .SH "CONFORMING TO"
98 .SH 準拠
99 4.4BSD.
100 .\"O .SH NOTES
101 .SH 注意
102 .\"O The
103 .\"O .BR strsep ()
104 .\"O function was introduced as a replacement for
105 .\"O .BR strtok (3),
106 .\"O since the latter cannot handle empty fields.
107 .BR strsep ()
108 関数は、
109 .BR strtok (3)
110 関数が空のフィールドを
111 扱えないために、その代替品として導入された。
112 .\"O However,
113 .\"O .BR strtok (3)
114 .\"O conforms to C89/C99 and hence is more portable.
115 しかしながら、
116 .BR strtok (3)
117 関数は C89/C99 に準拠しており、より移植性がある。
118 .\"O .SH BUGS
119 .SH バグ
120 .\"O Be cautious when using this function.
121 .\"O If you do use it, note that:
122 この関数を使う時は注意すること。
123 もし使うなら、以下のことに注意すること。
124 .IP * 2
125 .\"O This function modifies its first argument.
126 この関数は最初の引数を変更する。
127 .IP *
128 .\"O This function cannot be used on constant strings.
129 この関数は定数文字列には使えない。
130 .IP *
131 .\"O The identity of the delimiting character is lost.
132 区切り文字が何であったか分からなくなる。
133 .\"O .SH "SEE ALSO"
134 .SH 関連項目
135 .BR index (3),
136 .BR memchr (3),
137 .BR rindex (3),
138 .BR strchr (3),
139 .BR string (3),
140 .BR strpbrk (3),
141 .BR strspn (3),
142 .BR strstr (3),
143 .BR strtok (3)