table of contents
| rawmemchr(3) | Library Functions Manual | rawmemchr(3) |
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) 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).
| Interface | Attribute | Value |
| rawmemchr () | Thread safety | MT-Safe |
STANDARDS¶
GNU.
HISTORY¶
glibc 2.1.
SEE ALSO¶
| 2026-02-25 | Linux man-pages 6.18 |