kolibrios-fun/programs/develop/metcc/trunk/libc/string/strdup.c
Andrey Halyavin (halyavin) 51d395d0cc initial import of metcc project
git-svn-id: svn://kolibrios.org@145 a494cfbc-eb01-0410-851d-a64ba20cac60
2006-09-07 14:14:53 +00:00

10 lines
132 B
C

char* strdup(char* str)
{
char* res;
int len;
len=strlen(str)+1;
res=malloc(len);
memcpy(res,str,len);
return res;
}