scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

strpbrk.c (236B)


      1 #include <string.h>
      2 #undef strpbrk
      3 
      4 char *
      5 strpbrk(const char *s1, const char *s2)
      6 {
      7 	int c;
      8 	const char *p;
      9 
     10 	for (; c = *s1; ++s1) {
     11 		for (p = s2; *p && *p != c; ++p)
     12 			/* nothing */;
     13 		if (*p == c)
     14 			return s1;
     15 	}
     16 	return NULL;
     17 }