index(3C)


index -- string operations

Synopsis

   #include <strings.h> 
   

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

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

Description

rindex- string operations

These functions operate on NULL-terminated strings. They do not check for overflow of any receiving string.

index and rindex return a pointer to the first (last) occurrence of character c in string s, or a NULL pointer if c does not occur in the string. The NULL character terminating a string is considered to be part of the string.

References

bstring(3C), malloc(3C), string(3bsd), string(3C)

Notices

For user convenience, these functions are declared in the optional <strings.h> header file.
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.