1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
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.
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.
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
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" References consulted:
24 .\" Linux libc source code
25 .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
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)
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>
38 .\" WORD: delimiter 区切り文字
40 .TH STRSEP 3 2011-09-28 "GNU" "Linux Programmer's Manual"
42 strsep \- 文字列からトークンを取り出す
45 .B #include <string.h>
47 .BI "char *strsep(char **" stringp ", const char *" delim );
52 .RB ( feature_test_macros (7)
59 \fI*stringp\fP が NULL の場合、
62 さもなければ、文字列 \fIstringp\fP を
63 \fIdelim\fP に含まれる文字で区切った
65 トークンは、区切り文字を NULL バイト (\(aq\\0\(aq) で上書きすることで
67 \fI*stringp\fP は切り出されたトークンの次の位置を示すように更新される。
68 区切り文字が見つからない場合、\fI*stringp\fP 文字列全体がトークンとして
69 扱われ、\fI*stringp\fP は NULL となる。
73 つまり、元の \fI*stringp\fP の値を返す。
81 扱えないために、その代替品として導入された。
84 関数は C89/C99 に準拠しており、より移植性がある。