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