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