jitterbug/util.c
2022-12-29 20:10:36 +02:00

8 lines
169 B
C

#include "util.h"
char *string_dup(const char *s)
{
size_t len = strlen(s) + 1;
char *p = (char*)malloc(len);
return p ? (char*)memcpy(p, s, len) : NULL;
}