home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
PROG_C
/
SNPD9404.ZIP
/
STRDUP.C
< prev
next >
Wrap
C/C++ Source or Header
|
1994-04-03
|
273b
|
16 lines
/*
** Portable, public domain strdup() by Bob Stout
*/
#include <stdlib.h>
#include <string.h>
char *strdup(const char *string)
{
char *new;
if (NULL != (new = malloc(strlen(string) + 1)))
strcpy(new, string);
return new;
}