---
name: "index"
section: "3"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux", "freebsd", "macos"]
url: "https://new.carta.tech/index/3"
---

# index(3)

string search character

## NAME

index, rindex - string search character

## LIBRARY

Standard C library (*libc*, *-lc*)

## SYNOPSIS

```
#include <strings.h>
```

**\[\[deprecated\]\] char \*index(const char \****s***, int** *c***);** **\[\[deprecated\]\] char \*rindex(const char \****s***, int** *c***);**

## DESCRIPTION

**index**() is identical to [**strchr**(3)](/strchr/3.md); user the latter instead.

**rindex**() is identical to [**strrchr**(3)](/strrchr/3.md); use the latter instead.

## STANDARDS

None.

## HISTORY

4\.3BSD; marked as LEGACY in POSIX.1-2001; removed in POSIX.1-2008.

## SEE ALSO

[**strchr**(3)](/strchr/3.md), [**strrchr**(3)](/strrchr/3.md)
