|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|
#include <string.h> void * memccpy(void *to, const void *from, int ch, size_t nbytes)
This function copies characters from memory area from into to, stopping after the first occurrence of character ch has been copied, or after nbytes characters have been copied, whichever comes first. The buffers should not overlap.
A pointer to the character after the copy of ch in to,
NULL pointer if ch was not found in the first
nbytes characters of from.
char inpbuf, dest; printf("Enter a path: "); fflush(stdout); gets(inpbuf); memset(dest, 0, sizeof(dest)); if (memccpy(dest, inpbuf, '\\', 80)) printf("The first directory in path is %s\n", dest); else printf("No explicit directory in path\n");
|webmaster||delorie software privacy|
|Copyright © 2004||Updated Apr 2004|