logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

index, rindex - locate character in string

Description

index() is identical to strchr(3).

       rindex() is identical to strrchr(3).

       Use strchr(3) and strrchr(3) instead of these functions.

History

       4.3BSD; marked as LEGACY in POSIX.1-2001.  Removed in POSIX.1-2008, recommending strchr(3) and strrchr(3)
       instead.

Library

       Standard C library (libc, -lc)

Name

       index, rindex - locate character in string

See Also

strchr(3), strrchr(3)

Linux man-pages 6.9.1                              2024-05-02                                           index(3)

Standards

       None.

Synopsis

#include<strings.h>[[deprecated]]char*index(constchar*s,intc);[[deprecated]]char*rindex(constchar*s,intc);

See Also