home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Interactive Guide
/
c-cplusplus-interactive-guide.iso
/
c_ref
/
csource4
/
223_01
/
strncat.c
< prev
next >
Wrap
Text File
|
1979-12-31
|
512b
|
18 lines
/*
** concatenate n bytes max from t to end of s
** s must be large enough
*/
static char *xd;
strncat(s, t, n) char *s, *t; int n; {
xd = s;
--s;
while(*++s) ;
while(n--) {
if(*s++ = *t++) continue;
return(xd);
}
*s = 0;
return(xd);
}