Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
Guardian Native C Library Calls (n - r) rindex(3)
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 and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCREDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcredll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycredll
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.
527192-018 Hewlett-Packard Company 5−125