www.delorie.com/djgpp/doc/libc/libc_772.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

strrchr

Syntax

 
#include <string.h>

char *strrchr(const char *s1, int c);

Description

This function finds the last occurrence of c in s1.

Return Value

A pointer to the last match, or NULL if the character isn't in the string.

Portability

ANSI/ISO C C89; C99
POSIX 1003.2-1992; 1003.1-2001

Example

 
char *last_slash = strrchr(filename, '/');


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2004   by DJ Delorie     Updated Apr 2004