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