ack/lang/cem/libcc/gen/strcspn.c

15 lines
230 B
C
Raw Normal View History

1994-06-24 14:02:31 +00:00
/* $Id$ */
1987-01-27 15:57:55 +00:00
int
strcspn(string, notin)
char *string;
char *notin;
{
register char *s1, *s2;
for (s1 = string; *s1; s1++) {
for(s2 = notin; *s2 != *s1 && *s2; s2++) /* nothing */ ;
if (*s2) break;
}
return s1 - string;
}