home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 13
/
mediashare_13.zip
/
mediashare_13
/
ZIPPED
/
PROGRAM
/
SNIP9404.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;
}