/* Copyright (c) 2001-2009 by SoftIntegration, Inc. All Rights Reserved */
/***********************************************************
* Function File: strchr.c
*
* Note: (1)  ANSI C function in standard lib string.h
*       (2)  find the first occurance of c in s[]
*
* History: created by Harry H. Cheng, 2/19/1994
**********************************************************/
char * strchr(char *s, int c)
{
  
  if(s == NULL)        /* input is a NULL string */
    return NULL;
  else
  {
    for(; *s != c; s++)
      if(*s == '\0')    /* end of string */
        return NULL;
    return s;          /* find the character */
  }
}
