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