---
name: "memrchr"
section: "3pub"
platform: "linux"
package: "publib-dev"
version: "0.40-4"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/memrchr/3pub"
---

# memrchr(3pub)

find last occurrence of a character within another memory block

## NAME

memrchr - find last occurrence of a character within another memory block

## SYNOPSIS

```
#include <publib.h>
void *memrchr(const void *v, int c, size_t size);
```

## DESCRIPTION

*memrchr* finds the last occurrence of character *c* within memory block *v*, of length *size*.

## RETURN VALUE

*memrchr* returns a pointer to the the match, if it finds any, or a null pointer if it doesn't.

## SEE ALSO

publib(3), [memchr(3)](/memchr/3.md)

## AUTHOR

Lars Wirzenius (lars.wirzenius@helsinki.fi)
