void *memccpy(void *s1, const void *s2, int c, size_t n);
memccpy copies at most n characters from the object pointed to by s2 into the object pointed to by s1. The copying stops as soon as n characters are copied or the character c is copied into the destination object pointed to by s1. The behavior of memccpy is undefined if copying takes place between objects that overlap.
memccpy returns a pointer to the character immediately following c in s1, or NULL if c was not found in the first n characters of s2.
memccpy conforms to POSIX.1-2008.