home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 206.lha / C-Functions / strinstr.c < prev    next >
C/C++ Source or Header  |  1996-02-14  |  324b  |  13 lines

  1.  
  2. #include <exec/types.h>
  3.  
  4. int strinstr (s,c)       /* Check if character c is in string s */
  5. UBYTE s[];           /* Return first pos if found, else NULL */
  6. int c;               /* Will return NULL if '\0' was searched for */
  7.    {
  8. register int i=0;
  9.    while ( s[i] != c && s[i] ) i++;
  10.    return ( s[i] ? i+1 : NULL );
  11.    }
  12.  
  13.