Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ v10.0 : C library - <b>synopsis:</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <string.h>
    void *memccpy( void *dest, const void *src,
                   int c, size_t cnt );
    void __far *_fmemccpy( void __far *dest,
                           const void __far *src,
                           int c, size_t cnt );

Description:
    The memccpy and _fmemccpy functions copy bytes from src to dest up to
    and including the first occurrence of the character c or until cnt bytes
    have been copied, whichever comes first.

    The _fmemccpy function is a data model independent form of the memccpy
    function.  It accepts far pointer arguments and returns a far pointer.
     It is most useful in mixed memory model applications.

Returns:
    The memccpy and _fmemccpy functions return a pointer to the byte in dest
    following the character c if one is found and copied, otherwise it
    returns NULL.

See Also:
    memcpy, _fmemcpy, memmove, _fmemmove, memset, _fmemset

Example:
    #include <stdio.h>
    #include <string.h>

    char *msg = "This is the string: not copied";

    void main()
      {
        auto char buffer[80];

        memset( buffer, '\0', 80 );
        memccpy( buffer, msg, ':', 80 );
        printf( "%s\n", buffer );
      }

    produces the following:

    This is the string:

Classification:
    WATCOM

Systems:
     memccpy - All

    _fmemccpy - All

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson