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