welibc
A clear, secure, and well documented standard C library
Functions
strrchr.c File Reference

Defines the strrchr function. More...

#include <string.h>
Include dependency graph for strrchr.c:

Go to the source code of this file.

Functions

char * strrchr (const char *s, int c)
 Locate the last occurrence of a character in a string. More...
 

Detailed Description

Defines the strrchr function.

Definition in file strrchr.c.

Function Documentation

◆ strrchr()

char* strrchr ( const char *  s,
int  c 
)

Locate the last occurrence of a character in a string.

Parameters
*sString being searched
cCharacter to find

The strrchr function locates the last occurrence of c (converted to a char) in the string pointed to by s. The terminating null character is considered to be a part of the string.

Returns
A pointer to the located character
Return values
NULLThe character does not occur in the string

Definition at line 53 of file strrchr.c.

References NULL, and strlen().

Here is the call graph for this function: