1 #include <string.h> 2 #define N 256 3 4 char* strpbrk(const char * s,const char * b)5strpbrk(const char *s, const char *b) 6 { 7 char map[N]; 8 9 memset(map, 0, N); 10 for(;;) { 11 map[*b] = 1; 12 if(*b++ == 0) 13 break; 14 } 15 while(map[*s++] == 0) 16 ; 17 if(*--s) 18 return (char *)s; 19 return 0; 20 } 21