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