home *** CD-ROM | disk | FTP | other *** search
/ PC Extra Super CD 1998 January / PCPLUS131.iso / DJGPP / V2 / DJLSR201.ZIP / src / libc / compat / bsd / index.txh < prev    next >
Encoding:
Text File  |  1995-07-10  |  557 b   |  27 lines

  1. @node index, string
  2. @subheading Syntax
  3.  
  4. @example
  5. #include <strings.h>
  6.  
  7. char *index(const char *string, int ch);
  8. @end example
  9.  
  10. @subheading Description
  11.  
  12. Returns a pointer to the first occurrence of @var{ch} in @var{string}. 
  13. Note that the @code{NULL} character counts, so if you pass zero as
  14. @var{ch} you'll get a pointer to the end of the string back. 
  15.  
  16. @subheading Return Value
  17.  
  18. A pointer to the character, or @code{NULL} if it wasn't found.
  19.  
  20. @subheading Example
  21.  
  22. @example
  23. if (index(path, '*'))
  24.   do_wildcards(path);
  25. @end example
  26.  
  27.