rawmemchr(3)

rawmemchr3

Memory raw search character

Usage

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

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

Library

Standard C library (libc, -lc)

Overview

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) or memchr(3) 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).

InterfaceAttributeValue
rawmemchr()Thread safetyMT-Safe

Releases

10 releases since Debian 5.0 (Lenny); the text changed 9 times.

  1. 5.0
  2. 6.0
  3. 7
  4. 8
  5. 9
  6. 10
  7. 11
  8. 12
  9. 13
  10. Arch

Standards

GNU.

History

glibc 2.1.

From man-pages 6.19-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.