home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_progs / prog_c / mklib.lzh / MKLIB / EDLIB / STRCSPN.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-16  |  316 b   |  17 lines

  1. /* edlib  version 1.0 of 04/08/88 */
  2. /* Return the number of characters NOT from "charset" that are at the
  3.  * BEGINNING of string "string".
  4. */
  5.  
  6. int strcspn(str, charset)
  7. char *str, *charset;
  8. {
  9.         char *temp = str;
  10.  
  11.         while (!strchr(charset, *temp))
  12.                 ++temp;
  13.  
  14.         return(temp - str);
  15. }
  16.  
  17.