Guardian Native C Library Calls Reference Manual (G06.28+, H06.05+)

Guardian Native C Library Calls (g - i) index(3)
NAME
index - Scans string for a rst 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/sysnn/zcredll
SYNOPSIS
#include <strings.h>
char *index (
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 index() 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 rst occurrence of c|*O. The
index() function considers the null terminator to be part of the string.
NOTES
The index() function can be called by native processes only.
RETURN VALUES
On successful completion, the index( ) function returns a pointer to the byte which is the rst
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: rindex(3), strchr(3), strrchr(3).
STANDARDS CONFORMANCE
The index() function is dened in the XPG4 Version 2 specication.
527192-007 Hewlett-Packard Company 359