strpbrk.c 446 B

123456789101112131415161718192021
  1. /* Copyright (C) 1995,1996 Robert de Bath <rdebath@cix.compulink.co.uk>
  2. * This file is part of the Linux-8086 C library and is distributed
  3. * under the GNU Library General Public License.
  4. */
  5. #include <string.h>
  6. /* This uses strchr, strchr should be in assembler */
  7. char *strpbrk(str, set)
  8. register char *str;
  9. char *set;
  10. {
  11. while (*str != '\0')
  12. if (strchr(set, *str) == 0)
  13. ++str;
  14. else
  15. return (char *) str;
  16. return 0;
  17. }