Initial revision
This commit is contained in:
13
modules/src/string/strncpy.c
Normal file
13
modules/src/string/strncpy.c
Normal file
@@ -0,0 +1,13 @@
|
||||
/* Copy t into s, upto n characters
|
||||
*/
|
||||
char *
|
||||
strncpy(s, t, n)
|
||||
register char *s, *t;
|
||||
register int n;
|
||||
{
|
||||
register char *b = s;
|
||||
|
||||
while ((n-- > 0) && (*s++ = *t++))
|
||||
;
|
||||
return b;
|
||||
}
|
||||
Reference in New Issue
Block a user