#ifndef GNULIB_STRSEP_H_
#define GNULIB_STRSEP_H_
+#if HAVE_STRSEP
+
/*
- * Get strsep, if available.
+ * Get strsep() declaration.
*/
#include <string.h>
+#else
+
/* Searches the next delimiter (char listed in DELIM) starting at *STRINGP.
If one is found, it is overwritten with a NUL, and *STRINGP is advanced
to point to the next char after it. Otherwise, *STRINGP is set to NULL.
empty fields.
Caveat: It modifies the original string.
+ Caveat: These functions cannot be used on constant strings.
+ Caveat: The identity of the delimiting character is lost.
Caveat: It doesn't work with multibyte strings unless all of the delimiter
- characters are ASCII characters < 0x30. */
+ characters are ASCII characters < 0x30.
+
+ See also strtok_r(). */
extern char *strsep (char **stringp, const char *delim);
+#endif
+
#endif /* GNULIB_STRSEP_H_ */