Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include <string.h>
2
#define	N	256
3
 
4
char*
5
strpbrk(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
}