[Previous] [Contents] [Next]

rindex()

Find a character in a string

Synopsis:

#include <strings.h>

char *rindex( const char *s, 
              int c );

Library:

libc

Description:

The rindex() function returns a pointer to the last occurrence of the character c in the string s. This function operates on null-terminated strings. The null character is considered to be part of the string.

Returns:

A pointer to the character, or NULL if the character doesn't occur in the string.

Classification:

Standard Unix

Safety:
Cancellation point No
Interrupt handler Yes
Signal handler Yes
Thread Yes

See also:

index(), strchr(), strrchr()


[Previous] [Contents] [Next]