.\" Copyright (c) 1990, 1991 The Regents of the University of California. .\" All rights reserved. .\" .\" This code is derived from software contributed to Berkeley by .\" Chris Torek and the American National Standards Committee X3, .\" on Information Processing Systems. .\" .\" %sccs.include.redist.man% .\" .\" @(#)memchr.3 5.4 (Berkeley) 06/29/91 .\" .Dd .Dt MEMCHR 3 .Os .Sh NAME .Nm memchr .Nd locate byte in byte string .Sh SYNOPSIS .Fd #include .Ft void * .Fn memchr "const void *b" "int c" "size_t len" .Sh DESCRIPTION The .Fn memchr function locates the first occurrence of .Fa c (converted to an unsigned char) in string .Fa b . .Sh RETURN VALUES The .Fn memchr function returns a pointer to the byte located, or NULL if no such byte exists within .Fa len bytes. .Sh SEE ALSO .Xr index 3 , .Xr rindex 3 , .Xr strchr 3 , .Xr strcspn 3 , .Xr strpbrk 3 , .Xr strrchr 3 , .Xr strsep 3 , .Xr strspn 3 , .Xr strstr 3 , .Xr strtok 3 .Sh STANDARDS The .Fn memchr function conforms to .St -ansiC .