forked from Vhex-Kernel-Core/fxlibc
11 lines
175 B
C
11 lines
175 B
C
#include <string.h>
|
|
#include <stdlib.h>
|
|
|
|
char *strdup(char const *s)
|
|
{
|
|
size_t len = strlen(s) + 1;
|
|
char *copy = malloc(len);
|
|
if(copy) memcpy(copy, s, len);
|
|
return copy;
|
|
}
|