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

  1. @node memchr, memory
  2. @subheading Syntax
  3.  
  4. @example
  5. #include <string.h>
  6.  
  7. void *memchr(const void *string, int ch, size_t num);
  8. @end example
  9.  
  10. @subheading Description
  11.  
  12. This function searches @var{num} bytes starting at @var{string}, looking
  13. for the first occurence of @var{ch}. 
  14.  
  15. @subheading Return Value
  16.  
  17. A pointer to the first match, or @code{NULL} if it wasn't found.
  18.  
  19. @subheading Example
  20.  
  21. @example
  22. if (memchr(path, '/', strlen(path))
  23.   do_slash();
  24. @end example
  25.  
  26.