xref: /haiku/src/system/libroot/posix/string/strpbrk.c (revision 21258e2674226d6aa732321b6f8494841895af5f)
1 /*
2 ** Copyright 2001, Travis Geiselbrecht. All rights reserved.
3 ** Distributed under the terms of the NewOS License.
4 */
5 
6 #include <sys/types.h>
7 #include <string.h>
8 
9 
10 char *
11 strpbrk(char const *cs, char const *ct)
12 {
13 	const char *sc1;
14 	const char *sc2;
15 
16 	for (sc1 = cs; *sc1 != '\0'; ++sc1) {
17 		for (sc2 = ct; *sc2 != '\0'; ++sc2) {
18 			if (*sc1 == *sc2)
19 				return (char *)sc1;
20 		}
21 	}
22 
23 	return NULL;
24 }
25