This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
bug in strsep?
- To: gcc-help at gcc dot gnu dot org
- Subject: bug in strsep?
- From: Jason Knight <jwknight at ucdavis dot edu>
- Date: Tue, 12 Dec 2000 15:43:02 -0800 (PST)
Hi,
Trying to use "char* strsep(char **stringp, const char
*delim)" which supposedly
"returns the next token from the string stringp which is delimited
by delim. The token is terminated with a `\0' character and stringp is
updated to point past the token."
only if I give it a delimiter that is in the string I get a seg fault,
and if I give it a delimiter that is not in the string, it returns the
entire string.
thanks
Jason