xref: /csrg-svn/lib/libc/string/memchr.3 (revision 61193)
1*61193Sbostic.\" Copyright (c) 1990, 1991, 1993
2*61193Sbostic.\"	The Regents of the University of California.  All rights reserved.
341948Sbostic.\"
441948Sbostic.\" This code is derived from software contributed to Berkeley by
550310Sbostic.\" Chris Torek and the American National Standards Committee X3,
650310Sbostic.\" on Information Processing Systems.
750310Sbostic.\"
841948Sbostic.\" %sccs.include.redist.man%
941948Sbostic.\"
10*61193Sbostic.\"     @(#)memchr.3	8.1 (Berkeley) 06/04/93
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