ref: 3b24f6d8f63683c0cf5e19b9af7f93a2e9f28215 dir: /lib/xstrdup.c/
#include <string.h> #include "../inc/cc.h" char * xstrdup(const char *s) { size_t len = strlen(s) + 1; char *p = xmalloc(len); return memcpy(p, s, len); }