#include <string.h>
void huge *hmemccpy (
void huge *dest, /* destination buffer */
const void huge *src, /* source buffer */
char c, /* character which ends copy */
unsigned long len); /* maximum bytes to copy */
Description
The hmemccpy function copies 0 or more characters from
src to dest. Characters are
copied until the character c is copied or until
len bytes have been copied, whichever comes
first.
The hmemccpy function returns a pointer to the byte in
dest that follows the last character copied or a
null pointer if the last character copied was c.
#include <string.h<
#include <stdio.h> /* for printf */
void tst_memccpy (char huge *src1) {
static char dst1 [100];
void *c;
c = hmemccpy (dst1, src1, 'g', sizeof (dst1));
if (c == NULL)
printf ("'g' was not found in the src buffer\n");
else
printf ("characters copied up to 'g'\n");
}
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.