1*48351Scael.\" Copyright (c) 1990, 1991 The Regents of the University of California. 241985Sbostic.\" All rights reserved. 341985Sbostic.\" 441985Sbostic.\" %sccs.include.redist.man% 541985Sbostic.\" 6*48351Scael.\" @(#)memccpy.3 5.4 (Berkeley) 04/19/91 741985Sbostic.\" 8*48351Scael.Dd 9*48351Scael.Dt MEMCCPY 3 10*48351Scael.Os 11*48351Scael.Sh NAME 12*48351Scael.Nm memccpy 13*48351Scael.Nd copy string until character found 14*48351Scael.Sh SYNOPSIS 15*48351Scael.Fd #include <string.h> 16*48351Scael.Ft void * 17*48351Scael.Fn memccpy "void *dst" "const void *src" "int c" "size_t len" 18*48351Scael.Sh DESCRIPTION 19*48351ScaelThe 20*48351Scael.Fn memccpy 21*48351Scaelfunction 2241985Sbosticcopies bytes from string 23*48351Scael.Fa src 2441985Sbosticto string 25*48351Scael.Fa dst . 2641985SbosticIf the character 27*48351Scael.Fa c 2841985Sbostic(as converted to an unsigned char) occurs in the string 29*48351Scael.Fa src , 3041985Sbosticthe copy stops and a pointer to the byte after the copy of 31*48351Scael.Fa c 3241985Sbosticin the string 33*48351Scael.Fa dst 3441985Sbosticis returned. 3541985SbosticOtherwise, 36*48351Scael.Fa len 3741985Sbosticbytes are copied, and a NULL pointer is returned. 38*48351Scael.Sh SEE ALSO 39*48351Scael.Xr bcopy 3 , 40*48351Scael.Xr memcpy 3 , 41*48351Scael.Xr memmove 3 , 42*48351Scael.Xr strcpy 3 43*48351Scael.Sh HISTORY 44*48351ScaelThe 45*48351Scael.Fn memccpy 46*48351Scaelfunction is 47*48351Scael.Ud . 48