HELPLIB.HLB  —  CRTL  memccpy
    Copies characters sequentially between strings in memory areas.

    Format

      #include  <string.h>

      void *memccpy  (void *dest, void *source, int c, size_t n);

1  –  Function Variants

    The memccpy function has variants named _memccpy32 and _memccpy64
    for use with 32-bit and 64-bit pointer sizes, respectively.

2  –  Arguments

 dest

    A pointer to the location of a destination string.

 source

    A pointer to the location of a source string.

 c

    A character that you want to search for.

 n

    The number of charcter you want to copy.

3  –  Description

    The memccpy function operates on strings in memory areas. A
    memory area is a group of contiguous characters bound by a count
    and not terminated by a null character. The function does not
    check for overflow of the receiving memory area. The memccpy
    function is defined in the <string.h> header file.

    The memccpy function sequentially copies characters from the
    location pointed to by source into the location pointed to by
    dest until one of the following occurs:

    o  The character specified by c (converted to an unsigned char)
       is copied.

    o  The number of characters specified by n is copied.

4  –  Return Values

    x                  A pointer to the character following the
                       character specified by c in the string pointed
                       to by dest.
    NULL               Indicates an error. The character c is not
                       found after scanning n characters in the
                       string.
Close Help