 | C251 User's Guide |  |
|
|
| hmemccpy| Summary |
#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. Note - This function uses huge pointers to objects.
| | Return Value | 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. | | See Also | memccpy | | Example |
#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");
}
|
|
|