DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

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.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004