home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / diverses / jpl_c / index.c < prev    next >
Encoding:
C/C++ Source or Header  |  1986-05-18  |  768 b   |  24 lines

  1. /* 1.1  01-08-86                        (index.c)
  2.  ************************************************************************
  3.  *            Robert C. Tausworthe                *
  4.  *            Jet Propulsion Laboratory            *
  5.  *            Pasadena, CA 91009        1986        *
  6.  ************************************************************************/
  7.  
  8. #include "defs.h"
  9. #include "stdtyp.h"
  10.  
  11. /************************************************************************/
  12.     STRING
  13. index(s, c)        /* return pointer to char c in string s, if it
  14.                occurs, NULL otherwise.            */
  15. /*----------------------------------------------------------------------*/
  16. STRING s;
  17. {
  18.     int i;
  19.  
  20.     while ((i = *s) AND c ISNT i)
  21.         s++;
  22.     return (*s ? s : NULL);
  23. }
  24.