blob: 54c15784c443fe39be9449cfc31f6da33317642e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
/*
* Copyright (C) 1991, 1992 Linus Torvalds
*/
#include <xen/string.h>
/**
* strpbrk - Find the first occurrence of a set of characters
* @cs: The string to be searched
* @ct: The characters to search for
*/
char *strpbrk(const char * cs,const char * ct)
{
const char *sc1,*sc2;
for( sc1 = cs; *sc1 != '\0'; ++sc1) {
for( sc2 = ct; *sc2 != '\0'; ++sc2) {
if (*sc1 == *sc2)
return (char *) sc1;
}
}
return NULL;
}
/*
* Local variables:
* mode: C
* c-file-style: "BSD"
* c-basic-offset: 8
* tab-width: 8
* indent-tabs-mode: t
* End:
*/
|