]> pd.if.org Git - pdclib/blob - functions/string/strpbrk.c
Merged PDPCLIB and Therx code.
[pdclib] / functions / string / strpbrk.c
1 // ----------------------------------------------------------------------------
2 // $Id$
3 // ----------------------------------------------------------------------------
4 // Public Domain C Library - http://pdclib.sourceforge.net
5 // This code is Public Domain. Use, modify, and redistribute at will.
6 // ----------------------------------------------------------------------------
7
8 // ----------------------------------------------------------------------------
9 // C++
10
11 const char * strpbrk( const char * s1, const char * s2 ) { /* TODO */ };
12 char * strpbrk( char * s1, const char * s2 ) { /* TODO */ };
13
14 // ----------------------------------------------------------------------------
15 // Standard C
16
17 char * strpbrk( const char *s1, const char * s2 ) { /* TODO */ };
18
19 /* PDPC code - unreviewed
20 {
21     const char *p1;
22     const char *p2;
23     
24     p1 = s1;
25     while (*p1 != '\0')
26     {
27         p2 = s2;
28         while (*p2 != '\0')
29         {
30             if (*p1 == *p2) return ((char *)p1);
31             p2++;
32         }
33         p1++;
34     }
35     return (NULL);
36 }
37 */