xref: /csrg-svn/lib/libc/string/memchr.3 (revision 50310)
148351Scael.\" Copyright (c) 1990, 1991 The Regents of the University of California.
241948Sbostic.\" All rights reserved.
341948Sbostic.\"
441948Sbostic.\" This code is derived from software contributed to Berkeley by
5*50310Sbostic.\" Chris Torek and the American National Standards Committee X3,
6*50310Sbostic.\" on Information Processing Systems.
7*50310Sbostic.\"
841948Sbostic.\" %sccs.include.redist.man%
941948Sbostic.\"
10*50310Sbostic.\"     @(#)memchr.3	5.4 (Berkeley) 06/29/91
1141948Sbostic.\"
1248351Scael.Dd
1348351Scael.Dt MEMCHR 3
1448351Scael.Os
1548351Scael.Sh NAME
1648351Scael.Nm memchr
1748351Scael.Nd locate byte in byte string
1848351Scael.Sh SYNOPSIS
1948351Scael.Fd #include <string.h>
2048351Scael.Ft void *
2148351Scael.Fn memchr "const void *b" "int c" "size_t len"
2248351Scael.Sh DESCRIPTION
2348351ScaelThe
2448351Scael.Fn memchr
2548351Scaelfunction
2641948Sbosticlocates the first occurrence of
2748351Scael.Fa c
2841948Sbostic(converted to an unsigned char)
2941948Sbosticin string
3048351Scael.Fa b .
3148351Scael.Sh RETURN VALUES
3248351ScaelThe
3348351Scael.Fn memchr
3448351Scaelfunction
3548351Scaelreturns a pointer to the byte located,
3641948Sbosticor NULL if no such byte exists within
3748351Scael.Fa len
3841948Sbosticbytes.
3948351Scael.Sh SEE ALSO
4048351Scael.Xr index 3 ,
4148351Scael.Xr rindex 3 ,
4248351Scael.Xr strchr 3 ,
4348351Scael.Xr strcspn 3 ,
4448351Scael.Xr strpbrk 3 ,
4548351Scael.Xr strrchr 3 ,
4648351Scael.Xr strsep 3 ,
4748351Scael.Xr strspn 3 ,
4848351Scael.Xr strstr 3 ,
4948351Scael.Xr strtok 3
5048351Scael.Sh STANDARDS
5148351ScaelThe
5248351Scael.Fn memchr
5348351Scaelfunction
5448351Scaelconforms to
5548351Scael.St -ansiC .
56