1.\" Copyright (c) 1990, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" This code is derived from software contributed to Berkeley by 5.\" Chris Torek and the American National Standards Committee X3, 6.\" on Information Processing Systems. 7.\" 8.\" %sccs.include.redist.man% 9.\" 10.\" @(#)memchr.3 8.1 (Berkeley) 06/04/93 11.\" 12.Dd 13.Dt MEMCHR 3 14.Os 15.Sh NAME 16.Nm memchr 17.Nd locate byte in byte string 18.Sh SYNOPSIS 19.Fd #include <string.h> 20.Ft void * 21.Fn memchr "const void *b" "int c" "size_t len" 22.Sh DESCRIPTION 23The 24.Fn memchr 25function 26locates the first occurrence of 27.Fa c 28(converted to an unsigned char) 29in string 30.Fa b . 31.Sh RETURN VALUES 32The 33.Fn memchr 34function 35returns a pointer to the byte located, 36or NULL if no such byte exists within 37.Fa len 38bytes. 39.Sh SEE ALSO 40.Xr index 3 , 41.Xr rindex 3 , 42.Xr strchr 3 , 43.Xr strcspn 3 , 44.Xr strpbrk 3 , 45.Xr strrchr 3 , 46.Xr strsep 3 , 47.Xr strspn 3 , 48.Xr strstr 3 , 49.Xr strtok 3 50.Sh STANDARDS 51The 52.Fn memchr 53function 54conforms to 55.St -ansiC . 56