Open System Services Library Calls Reference Manual (G06.28+, H06.05+)
rindex(3) OSS Library Calls Reference Manual
NAME
|
rindex - Scans string for last occurrence of a character |
LIBRARY |
G-series native Guardian processes: $SYSTEM.SYSnn.ZSTFNSRL |
G-series native OSS processes: /G/system/sysnn/zstfnsrl |
H-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCREDLL |
H-series OSS processes: /G/system/zdllnnn/zcredll |
SYNOPSIS
|
#include <strings.h> |
char *rindex ( |
const char *s, |
int c); |
PARAMETERS
|
s ||
Is a pointer to the string to be scanned. |
c ||
Is the character being scanned for. |
DESCRIPTION |
The rindex( ) function converts the value of the c parameter from an int to an unsigned char.It |
then searches the string pointed to by the s parameter for the last occurrence of c. The rindex() |
function considers the null terminator to be part of the string. |
NOTES |
The rindex( ) function can be called by native processes only. |
RETURN VALUES
|
On successful completion, the rindex( ) function returns a pointer to the byte which is the last |
occurrence of c or a null pointer if the character c does not occur in the string. |
ERRORS |
None. This function does not set errno.|
RELATED INFORMATION
|
Functions: index(3), strchr(3), strrchr(3).|
STANDARDS CONFORMANCE
|
The rindex( ) function is defined in the XPG4 Version 2 specification. |
5−116 Hewlett-Packard Company 527187-007