home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / ansi / string / strspn.txh < prev    next >
Encoding:
Text File  |  1995-07-10  |  597 b   |  29 lines

  1. @node strspn, string
  2. @subheading Syntax
  3.  
  4. @example
  5. #include <string.h>
  6.  
  7. size_t strspn(const char *s1, const char *set);
  8. @end example
  9.  
  10. @subheading Description
  11.  
  12. This function finds the first character in @var{s1} that does not match
  13. any character in @var{set}.  Note that the @code{NULL} bytes at the end
  14. of @var{s1} counts, so you'll at least get a pointer to the end of the
  15. string if nothing else. 
  16.  
  17. @subheading Return Value
  18.  
  19. The index of the found character.
  20.  
  21. @subheading Example
  22.  
  23. @example
  24. int i = strcspn(entry, " \t\b");
  25. if (entry[i])
  26.   do_something();
  27. @end example
  28.  
  29.