home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Really Useful CD 1
/
ReallyUsefulCD1.iso
/
extras
/
progutils
/
c_utils
/
c
/
strnpcpy
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1989-03-16
|
299 b
|
16 lines
/* > C.Strnpcpy - copy a string, returning a pointer to the end */
#include <ctype.h>
#include "utils.h"
char *strnpcpy (char *s, const char *t, int n)
{
while ( --n >= 0 && ( *s = *t ) != '\0' )
{
++s;
++t;
}
return (s);
}