home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume12 / cnews / part01 / libc / strings / index.c < prev    next >
Encoding:
C/C++ Source or Header  |  1987-10-19  |  242 b   |  16 lines

  1. /*
  2.  * index - find first occurrence of a character in a string
  3.  */
  4.  
  5. #define    NULL    0
  6.  
  7. char *                /* found char, or NULL if none */
  8. index(s, charwanted)
  9. CONST char *s;
  10. char charwanted;
  11. {
  12.     extern char *strchr();
  13.  
  14.     return(strchr(s, charwanted));
  15. }
  16.