Debian Codegraph @

upstream/debian-unstable/man3/rawmemchr.3

raw
1 '\" t
2 .\" Copyright 1993, David Metcalfe <[email protected]>
3 .\" Copyright, the authors of the Linux man-pages project
4 .\"
5 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .\"
7 .TH rawmemchr 3 2026-02-25 "Linux man-pages 6.18"
8 .SH NAME
9 rawmemchr \- memory raw search character
10 .SH LIBRARY
11 Standard C library
12 .RI ( libc ,\~ \-lc )
13 .SH SYNOPSIS
14 .nf
15 .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
16 .B #include <string.h>
17 .P
18 .BI "[[deprecated]] void *rawmemchr(const void *" s ", int " c );
19 .fi
20 .SH DESCRIPTION
21 The
22 .BR rawmemchr ()
23 function is similar to
24 .BR memchr (),
25 but it assumes
26 (i.e., the programmer knows for certain)
27 that an instance of
28 .I c
29 lies somewhere in the memory area starting at the location pointed to by
30 .IR s .
31 .P
32 If an instance of
33 .I c
34 is not found, the behavior is undefined.
35 Use either
36 .BR strlen (3)
37 or
38 .BR memchr (3)
39 instead.
40 .SH RETURN VALUE
41 The
42 .BR rawmemchr ()
43 function returns a pointer to the matching byte.
44 .SH ATTRIBUTES
45 For an explanation of the terms used in this section, see
46 .BR attributes (7).
47 .TS
48 allbox;
49 lbx lb lb
50 l l l.
51 Interface Attribute Value
52 T{
53 .na
54 .nh
55 .BR rawmemchr ()
56 T} Thread safety MT-Safe
57 .TE
58 .SH STANDARDS
59 GNU.
60 .SH HISTORY
61 glibc 2.1.
62 .SH SEE ALSO
63 .BR memchr (3),
64 .BR strlen (3),
65 .BR strnul (3)