home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 216.lha / EdLib_v1.0 / strcspn.c < prev    next >
C/C++ Source or Header  |  1996-02-15  |  316b  |  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.