1
0
mirror of https://github.com/UzixLS/KernelEx.git synced 2025-07-19 07:21:20 +03:00
Files
KernelEx/kexcrt/strdup.c
2018-11-03 16:22:04 +03:00

17 lines
233 B
C
Executable File

#include <stdlib.h>
#include <string.h>
char *strdup(const char *str)
{
char *newstr;
if (!str)
return NULL;
newstr = (char *) malloc(strlen(str) + 1);
if (newstr)
strcpy(newstr, str);
return newstr;
}