INDEX(3) Library Functions Manual INDEX(3)

indexcharacter string operations (LEGACY)


#include <strings.h>

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

The index () function shall be equivalent to strchr(3).

See strchr(3).

See strchr(3).

None.

The strchr(3) function is preferred over this function.

For maximum portability, it is recommended to replace the function call to index () as follows:

#define index(a,b) strchr((a),(b))

None.

This function may be withdrawn in a future version.

strchr(3), the Base Definitions volume of IEEE Std 1003.1-2001 (“POSIX.1”), <strings.h>

First released in Issue 4, Version 2.

Moved from X/OPEN UNIX extension to BASE.

This function is marked LEGACY.

footer end

January 1, 2004 posix.fail