tiddy up debug a little
[AROS.git] / compiler / stdc / strpbrk.c
blob36200c6901508203986b96eddb90c6aa52cc3454
1 /*
2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
3 $Id$
5 C99 function strpbrk().
6 */
8 /*****************************************************************************
10 NAME */
11 #include <string.h>
13 char * strpbrk (
15 /* SYNOPSIS */
16 const char * str,
17 const char * accept)
19 /* FUNCTION
20 Locate the first occurrence of any character in accept in str.
22 INPUTS
23 str - Search this string
24 accept - Look for these characters
26 RESULT
27 A pointer to the first occurence of any character in accept in str
28 or NULL if no character of accept is not found in str.
30 NOTES
32 EXAMPLE
33 char buffer[64];
35 strcpy (buffer, "Hello ");
37 // This returns a pointer to the first l in buffer.
38 strpbrk (buffer, "lo");
40 // This returns NULL
41 strpbrk (buffer, "xyz");
43 BUGS
45 SEE ALSO
46 strchr(), strrchr()
48 INTERNALS
50 ******************************************************************************/
52 while (*str)
54 if (strchr (accept, *str))
55 return ((char *)str);
57 str ++;
60 return(0);
61 } /* strpbrk */