/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
/***********************************************************
* Function File: strpbrk.c
*
* Note: (1)  ANSI C function in standard lib string.h
*       (2)  find the index i of the first s[i] that matches any s2[]
*
* History: created by Harry H. Cheng, 2/19/1994
**********************************************************/
char * strpbrk(char *s1, char *s2)
{
  char *sc1, *sc2;

  if(s1 == NULL || s2 == NULL)
    return NULL;

  for(sc1 = s1; *sc1 != '\0'; sc1++)
    for(sc2 = s2; *sc2 != '\0'; sc2++)
      if(*sc1 == *sc2)
         return sc1;
  return NULL;
}
