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 Library Reference - <u>synopsis:</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <string.h>
    char *strcpy( char *dst, const char *src );
    char __far *_fstrcpy( char __far *dst,
                          const char __far *src );
    #include <wchar.h>
    wchar_t *wcscpy( wchar_t *dst, const wchar_t *src );
    #include <mbstring.h>
    int _mbscpy( unsigned char *dst,
                 const unsigned char *src );
    int _fmbscpy( unsigned char __far *dst,
                  const unsigned char __far *src );

Description:
    The strcpy function copies the string pointed to by src (including the
    terminating null character) into the array pointed to by dst.  Copying
    of overlapping objects is not guaranteed to work properly.  See the
    description for the  memmove function to copy objects that overlap.

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

    The wcscpy function is a wide-character version of strcpy that operates
    with wide-character strings.

    The _mbscpy function is a multibyte character version of strcpy that
    operates with multibyte character strings.

Returns:
    The value of dst is returned.

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

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

        strcpy( buffer, "Hello " );
        strcat( buffer, "world" );
        printf( "%s\n", buffer );
      }

    produces the following:

    Hello world

Classification:
    strcpy is ANSI, _fstrcpy is not ANSI, wcscpy is ANSI, _mbscpy is not
    ANSI, _fmbscpy is not ANSI

Systems:
     strcpy - All, Netware

    _fstrcpy - All
    wcscpy - All
    _mbscpy - DOS, Windows, Win386, Win32, OS/2 1.x(all), OS/2-32
    _fmbscpy - DOS, Windows, Win386, Win32, OS/2 1.x(all), OS/2-32

See Also:
    strdup, strncpy

See Also:

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