strpbrk.c 454 B

12345678910111213141516171819202122
  1. /*
  2. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
  3. * See the copyright notice in the ACK home directory, in the file "Copyright".
  4. */
  5. /* $Id$ */
  6. #include <string.h>
  7. char *
  8. strpbrk(register const char *string, register const char *brk)
  9. {
  10. register const char *s1;
  11. while (*string) {
  12. for (s1 = brk; *s1 && *s1 != *string; s1++)
  13. /* EMPTY */ ;
  14. if (*s1)
  15. return (char *)string;
  16. string++;
  17. }
  18. return (char *)NULL;
  19. }