DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

index(S)


index, rindex -- string operations

Syntax

cc . . . -lc
#include <strings.h>

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

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

Description

index- character string operation

rindex- character string operation

The index function is identical to the strchr function. The rindex function is identical to the strrchr function. See string(S). index and rindex are provided for backwards compatibility: strchr and strrchr are to be recommended.

Return values

Refer to strchr and strrchr.

Diagnostics

Refer to strchr and strrchr.

See also

string(S)

Standards conformance

index and rindex are conformant with:

X/Open Portability Guide Issue 4, Version 2 (Spec-1170).


© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003