1 /* Copyright (C) 2004 Free Software Foundation, Inc.
2 * Written by Yoann Vandoorselaere <yoann@prelude-ids.org>
4 * The file is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This file is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this file; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 #ifndef GNULIB_STRSEP_H_
21 #define GNULIB_STRSEP_H_
26 * Get strsep() declaration.
32 /* Searches the next delimiter (char listed in DELIM) starting at *STRINGP.
33 If one is found, it is overwritten with a NUL, and *STRINGP is advanced
34 to point to the next char after it. Otherwise, *STRINGP is set to NULL.
35 If *STRINGP was already NULL, nothing happens.
36 Returns the old value of *STRINGP.
38 This is a variant of strtok() that is multithread-safe and supports
41 Caveat: It modifies the original string.
42 Caveat: These functions cannot be used on constant strings.
43 Caveat: The identity of the delimiting character is lost.
44 Caveat: It doesn't work with multibyte strings unless all of the delimiter
45 characters are ASCII characters < 0x30.
47 See also strtok_r(). */
49 extern char *strsep (char **stringp, const char *delim);
53 #endif /* GNULIB_STRSEP_H_ */