date and time created 90/05/15 14:01:13 by bostic
[unix-history] / usr / src / lib / libc / string / memchr.3
CommitLineData
01da7faa
KB
1.\" Copyright (c) 1990 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" This code is derived from software contributed to Berkeley by
5.\" Chris Torek.
6.\"
7.\" %sccs.include.redist.man%
8.\"
9.\" @(#)memchr.3 5.1 (Berkeley) %G%
10.\"
11.TH MEMCHR 3 ""
12.UC 7
13.SH NAME
14memchr \- locate byte in byte string
15.SH SYNOPSIS
16.nf
17.ft B
18#include <string.h>
19
20int
21memchr(const void *b, int c, size_t len);
22.ft R
23.fi
24.SH DESCRIPTION
25.B Memchr
26locates the first occurrence of
27.I c
28(converted to an unsigned char)
29in string
30.IR b .
31It returns a pointer to the byte located,
32or NULL if no such byte exists within
33.I len
34bytes.
35.SH SEE ALSO
36index(3), rindex(3), strchr(3), strcspn(3), strpbrk(3), strrchr(3),
37strsep(3), strspn(3), strstr(3), strtok(3)
38.SH STANDARDS
39.I Memchr
40conforms to ANSI X3.159-1989 (``ANSI C'').