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

  1. @node rindex, string
  2. @subheading Syntax
  3.  
  4. @example
  5. #include <strings.h>
  6.  
  7. char *rindex(const char *string, int ch);
  8. @end example
  9.  
  10. @subheading Description
  11.  
  12. Returns a pointer to the last 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. char *last_slash = rindex(filename, '/');
  24. @end example
  25.  
  26.