1MEMCCPY(P)                 POSIX Programmer's Manual                MEMCCPY(P)
2
3
4

NAME

6       memccpy - copy bytes in memory
7

SYNOPSIS

9       #include <string.h>
10
11       void *memccpy(void *restrict s1, const void *restrict s2,
12              int c, size_t n);
13
14

DESCRIPTION

16       The  memccpy()  function  shall copy bytes from memory area s2 into s1,
17       stopping after the first occurrence of byte c (converted to an unsigned
18       char) is copied, or after n bytes are copied, whichever comes first. If
19       copying takes place between objects that overlap, the behavior is unde‐
20       fined.
21

RETURN VALUE

23       The  memccpy()  function  shall  return a pointer to the byte after the
24       copy of c in s1, or a null pointer if c was not found in  the  first  n
25       bytes of s2.
26

ERRORS

28       No errors are defined.
29
30       The following sections are informative.
31

EXAMPLES

33       None.
34

APPLICATION USAGE

36       The memccpy() function does not check for the overflow of the receiving
37       memory area.
38

RATIONALE

40       None.
41

FUTURE DIRECTIONS

43       None.
44

SEE ALSO

46       The Base Definitions volume of IEEE Std 1003.1-2001, <string.h>
47
49       Portions of this text are reprinted and reproduced in  electronic  form
50       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
51       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
52       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
53       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
54       event of any discrepancy between this version and the original IEEE and
55       The Open Group Standard, the original IEEE and The Open Group  Standard
56       is  the  referee document. The original Standard can be obtained online
57       at http://www.opengroup.org/unix/online.html .
58
59
60
61IEEE/The Open Group                  2003                           MEMCCPY(P)
Impressum