ref: 7d416c42124594d23b5c26d6951b748a43b4de65 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); }