xref: /csrg-svn/lib/libc/string/memccpy.3 (revision 62919)
1*62919Sbostic.\" Copyright (c) 1990, 1991, 1993
2*62919Sbostic.\"	The Regents of the University of California.  All rights reserved.
341985Sbostic.\"
441985Sbostic.\" %sccs.include.redist.man%
541985Sbostic.\"
6*62919Sbostic.\"     @(#)memccpy.3	8.1 (Berkeley) 06/09/93
741985Sbostic.\"
848351Scael.Dd
948351Scael.Dt MEMCCPY 3
1048351Scael.Os
1148351Scael.Sh NAME
1248351Scael.Nm memccpy
1348351Scael.Nd copy string until character found
1448351Scael.Sh SYNOPSIS
1548351Scael.Fd #include <string.h>
1648351Scael.Ft void *
1748351Scael.Fn memccpy "void *dst" "const void *src" "int c" "size_t len"
1848351Scael.Sh DESCRIPTION
1948351ScaelThe
2048351Scael.Fn memccpy
2148351Scaelfunction
2241985Sbosticcopies bytes from string
2348351Scael.Fa src
2441985Sbosticto string
2548351Scael.Fa dst .
2641985SbosticIf the character
2748351Scael.Fa c
2841985Sbostic(as converted to an unsigned char) occurs in the string
2948351Scael.Fa src ,
3041985Sbosticthe copy stops and a pointer to the byte after the copy of
3148351Scael.Fa c
3241985Sbosticin the string
3348351Scael.Fa dst
3441985Sbosticis returned.
3541985SbosticOtherwise,
3648351Scael.Fa len
3741985Sbosticbytes are copied, and a NULL pointer is returned.
3848351Scael.Sh SEE ALSO
3948351Scael.Xr bcopy 3 ,
4048351Scael.Xr memcpy 3 ,
4148351Scael.Xr memmove 3 ,
4248351Scael.Xr strcpy 3
4348351Scael.Sh HISTORY
4448351ScaelThe
4548351Scael.Fn memccpy
4662918Sbosticfunction first appeared in 4.4BSD.
47