qc.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, strncpy
 Summary Example                         Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
     The strcpy and strncpy functions operate on null-terminated
     strings. The <string> 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 <string2> (including the terminating
     null character) to the location specified by <string1>, and
     returns <string1>.
 
     The strncpy function copies exactly <count> characters of
     <string2> to <string1> and returns <string1>. If <count> is less
     than the length of <string2>, a null character (\0) is not
     appended automatically to the copied string. If <count> is greater
     than the length of <string2>, the <string1> result is padded with
     null characters (\0) up to length <count>. The behavior of
     strncpy is undefined if the address ranges of <string1> and
     <string2> 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.
                                    -♦-