C Language and Libraries Help (clang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
strcpy, _fstrcpy, strncpy, _fstrncpy
 Summary Example                         Up Contents Index Back
─────Run-Time Library───────────────────────────────────────────────────────
 
     The strcpy and strncpy functions operate on null-terminated
     strings. The arguments to these functions are expected to contain
     a null character (\0) marking the end of the string. No overflow
     checking is performed when strings are copied.
 
     The strcpy function copies <src> (including the terminating null
     character) to the location specified by <dest>, and returns
     <dest>.
 
     The strncpy function copies exactly <count> characters of <src>
     to <dest> and returns <dest>. If <count> is less than the length
     of <src>, a null character (\0) is not appended automatically
     to the copied string. If <count> is greater than the length of
     <src>, the <dest> result is padded with null characters (\0) up
     to length <count>. The behavior of strncpy is undefined if the
     address ranges of <dest> and <src> overlap.
 
     The _f... forms of these functions are model-independent (large-
     model) forms that use far pointer forms of the string arguments
     and return values. These model-independent functions can be
     called from any point in the program.
 
     Return Value
 
     The return values for these functions are described above.
                                    -♦-