char *firsttok(const char *s,const char *delimiter,char first[])
{
const char *p;
const char *a;
for(p = s;*p!='\0';++p) {
for (a = delimiter;*a != '\0';++a) {
if (*p == *a) {
strncpy(first,s,p-s);
return first;
}
}
}
return NULL;
}
{
const char *p;
const char *a;
for(p = s;*p!='\0';++p) {
for (a = delimiter;*a != '\0';++a) {
if (*p == *a) {
strncpy(first,s,p-s);
return first;
}
}
}
return NULL;
}