| Summary |
#include <string.h>
void *fmemccpy (
void far *dest, /* destination buffer */
const void far *src, /* source buffer */
char c, /* character which ends copy */
unsigned int len); /* maximum bytes to copy */
|
| Description | The fmemccpy 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 far pointers to objects and may be used in any memory model other than Tiny Model.
|
| Return Value | The fmemccpy 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 | fmemchr, fmemcmp, fmemcpy, fmemmove, fmemset, hmemcmp, memcmp, xmemcmp |
| Example |
#include <string.h<
#include <stdio.h> /* for printf */
void tst_memccpy (char far *src1) {
static char dst1 [100];
void *c;
c = fmemccpy (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");
}
|