home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_progs / prog_c / plplot.lzh / PLPLOT / PLPLOT.LZH / plplot / src / stsearch.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-03-23  |  367 b   |  21 lines

  1. /* Searches string str for character chr (case insensitive) */
  2.  
  3. #include "plplot.h"
  4. #include <ctype.h>
  5. #ifdef PLSTDC
  6. #include <string.h>
  7. #else
  8. extern char *strchr();
  9. #endif
  10.  
  11. PLINT stsearch(str,chr)
  12. char *str,chr;
  13. {
  14.     if (strchr(str,chr))
  15.         return((PLINT)1);
  16.     else if(strchr(str,toupper(chr)))
  17.         return((PLINT)1);
  18.     else
  19.         return((PLINT)0);
  20. }
  21.