The Open Group Base Specifications Issue 6
IEEE Std 1003.1, 2003 Edition
Copyright © 2001-2003 The IEEE and The Open Group, All Rights reserved.

NAME

index - character string operations (LEGACY)

SYNOPSIS

[XSI] [Option Start] #include <strings.h>

char *index(const char *
s, int c); [Option End]

DESCRIPTION

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

RETURN VALUE

See strchr() .

ERRORS

See strchr() .


The following sections are informative.

EXAMPLES

None.

APPLICATION USAGE

The strchr() 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))

RATIONALE

None.

FUTURE DIRECTIONS

This function may be withdrawn in a future version.

SEE ALSO

strchr() , the Base Definitions volume of IEEE Std 1003.1-2001, <strings.h>

CHANGE HISTORY

First released in Issue 4, Version 2.

Issue 5

Moved from X/OPEN UNIX extension to BASE.

Issue 6

This function is marked LEGACY.

End of informative text.


UNIX ® is a registered Trademark of The Open Group.
POSIX ® is a registered Trademark of The IEEE.
[ Main Index | XBD | XCU | XSH | XRAT ]