4.3BSD-Reno/share/man/cat3/strncpy.0

Compare this file to the similar file:
Show the results in this format:




STRCPY(3)		      1990			STRCPY(3)



NNAAMMEE
     strcpy - copy strings

SSYYNNOOPPSSIISS
     ##iinncclluuddee <<ssttrriinngg..hh>>

     cchhaarr **
     ssttrrccppyy((cchhaarr **ddsstt,, ccoonnsstt cchhaarr **ssrrcc));;

     cchhaarr **
     ssttrrnnccppyy((cchhaarr **ddsstt,, ccoonnsstt cchhaarr **ssrrcc,, ssiizzee__tt lleenn));;

DDEESSCCRRIIPPTTIIOONN
     SSttrrccppyy and ssttrrnnccppyy copy string _s_r_c to _d_s_t, stopping after
     the terminating '\0' has been moved.

     SSttrrnnccppyy writes exactly _l_e_n characters into _d_s_t, appending
     '\0' characters if _s_r_c is less than _l_e_n characters long, and
     _n_o_t terminating _d_s_t if _s_r_c is more than _l_e_n characters long.

     SSttrrccppyy and ssttrrnnccppyy return _d_s_t.

EEXXAAMMPPLLEESS
     The following sets ``chararray'' to ``abc\0\0\0'':

	  (void)strncpy(chararray, "abc", 6).

     The following sets ``chararray'' to ``abcdef'':

	  (void)strncpy(chararray, "abcdefgh", 6);

SSEEEE AALLSSOO
     bcopy(3), memccpy(3), memcpy(3), memmove(3)

SSTTAANNDDAARRDDSS
     SSttrrccppyy and ssttrrnnccppyy conform to ANSI X3.159-1989 (``ANSI C'').



















Printed 7/27/90               June				1