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