1.\" Copyright (c) 1990, 1991 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.\" %sccs.include.redist.man% 7.\" 8.\" @(#)memchr.3 5.3 (Berkeley) 04/19/91 9.\" 10.Dd 11.Dt MEMCHR 3 12.Os 13.Sh NAME 14.Nm memchr 15.Nd locate byte in byte string 16.Sh SYNOPSIS 17.Fd #include <string.h> 18.Ft void * 19.Fn memchr "const void *b" "int c" "size_t len" 20.Sh DESCRIPTION 21The 22.Fn memchr 23function 24locates the first occurrence of 25.Fa c 26(converted to an unsigned char) 27in string 28.Fa b . 29.Sh RETURN VALUES 30The 31.Fn memchr 32function 33returns a pointer to the byte located, 34or NULL if no such byte exists within 35.Fa len 36bytes. 37.Sh SEE ALSO 38.Xr index 3 , 39.Xr rindex 3 , 40.Xr strchr 3 , 41.Xr strcspn 3 , 42.Xr strpbrk 3 , 43.Xr strrchr 3 , 44.Xr strsep 3 , 45.Xr strspn 3 , 46.Xr strstr 3 , 47.Xr strtok 3 48.Sh STANDARDS 49The 50.Fn memchr 51function 52conforms to 53.St -ansiC . 54