MicrOS
strrchr.c File Reference
#include "../string.h"

Functions

char * strrchr (char *str, int character)
 Locate last occurrence of character in string. More...
 

Function Documentation

◆ strrchr()

char* strrchr ( char *  str,
int  character 
)

Locate last occurrence of character in string.

Returns a pointer to the last occurrence of character in the C string str.

Parameters
str1C string.
characterCharacter to be located. It is passed as its int promotion, but it is internally converted back to char.
Returns
A pointer to the last occurrence of character in str. If the character is not found, the function returns a null pointer.