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

# strrchr(3)

string rear-search character

## NAME

strrchr - string rear-search character

## LIBRARY

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

## SYNOPSIS

```
#include <string.h>
```

**char \*strrchr(const char \****s***, int** *c***);**

## DESCRIPTION

**strrchr**() returns a pointer to the last occurrence of the character *c* in the string *s*.

It is equivalent to

```
memrchr(s, c, strlen(s) + 1)
```

## RETURN VALUE

See [**strchr**(3)](/strchr/3.md).

## ATTRIBUTES

For an explanation of the terms used in this section, see [**attributes**(7)](/attributes/7.md).

| | | |
| --- | --- | --- |
| **Interface** | **Attribute** | **Value** |
| **strrchr**() | Thread safety | MT-Safe |

## STANDARDS

C11, POSIX.1-2008.

## HISTORY

POSIX.1-2001, C89, SVr4, 4.3BSD.

## SEE ALSO

[**string**(3)](/string/3.md), [**strchr**(3)](/strchr/3.md), [**wcsrchr**(3)](/wcsrchr/3.md)
