locate character in string

You're viewing an older version of this page (#3293). View the current version.

View versions (3)

NAME

strrchr

INTERFACE

#include <string.h> char strrchr ( const char *s, int c )

DESCRIPTION

The strrchr function locates the last occurrence of &#92;c c (converted to a char) in the string &#92;c s. If &#92;c c is '<span class="Qlq">\\0</span>', strrchr locates the terminating '<span class="Qlq">\\0</span>'.

RETURN VALUES

The strrchr function returns a pointer to the character, or a null pointer if &#92;c c does not occur anywhere in &#92;c s.

SEE ALSO

memchr (3) , strchr (3) , strcspn (3) , strpbrk (3) , reference:strsep (3) , strspn (3) , strstr (3) , strtok (3)

STANDARDS

The strrchr function conforms to