manpagez: man pages & more
man memccpy(3)
Home | About | info | man | News  
memccpy(3)               BSD Library Functions Manual               memccpy(3)


NAME

     memccpy -- copy string until character found


LIBRARY

     Standard C Library (libc, -lc)


SYNOPSIS

     #include <string.h>

     void *
     memccpy(void *restrict s1, const void *restrict s2, int c, size_t n);


DESCRIPTION

     The memccpy() function copies bytes from string s2 to string s1.  If the
     character c (as converted to an unsigned char) occurs in the string s2,
     the copy stops and a pointer to the byte after the copy of c in the
     string s1 is returned.  Otherwise, n bytes are copied, and a NULL pointer
     is returned.


SEE ALSO

     bcopy(3), memcpy(3), memmove(3), strcpy(3)


HISTORY

     The memccpy() function first appeared in 4.4BSD.

BSD                              June 9, 1993                              BSD

Mac OS X 10.5 - Generated Sun Oct 28 21:35:03 EDT 2007