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

# rawmemchr(3)

memory raw search character

## NAME

rawmemchr - memory raw search character

## LIBRARY

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

## SYNOPSIS

```
#define _GNU_SOURCE  /* See feature_test_macros(7) */
#include <string.h>
```

**\[\[deprecated\]\] void \*rawmemchr(const void \****s***, int** *c***);**

## DESCRIPTION

The **rawmemchr**() function is similar to **memchr**(), but it assumes (i.e., the programmer knows for certain) that an instance of *c* lies somewhere in the memory area starting at the location pointed to by *s*.

If an instance of *c* is not found, the behavior is undefined. Use either [**strlen**(3)](/strlen/3.md) or [**memchr**(3)](/memchr/3.md) instead.

## RETURN VALUE

The **rawmemchr**() function returns a pointer to the matching byte.

## ATTRIBUTES

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

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

## STANDARDS

GNU.

## HISTORY

glibc 2.1.

## SEE ALSO

[**memchr**(3)](/memchr/3.md), [**strlen**(3)](/strlen/3.md), [**strnul**(3)](/strnul/3.md)
