SilverScreen Solid Modeler

strncpy

strncpy

Previous topic Next topic  

strncpy

Previous topic Next topic JavaScript is required for the print function  

StandardCLibrary

 

char *strncpy( char *s1, char *s2, size_t count )

 

char  *s1;           /* a string */

char  *s2;           /* a string */

size_t count;        /* maximum number of characters to copy */

 

 




Synopsis

#include "string.h"

 

The strncpy function copies at most count characters from s2 into s1 . If there are less than count characters in s2 , then after copying s2 , s1 is padded with null characters to the length count .

 

 

Parameters

s1 and s2 are null-terminated strings. count is an integer specifying the maximum number of characters to copy.

 

 

Return Value

strncpy returns s1 .

 

 

See Also

strcpy