ref: 7a98fbfa64e0a53f772dce3f3c4b488dfb68f147 dir: /lib9/strdup.c/
#include "lib9.h" char* strdup(const char *s) { char *os; os = malloc(strlen(s) + 1); if(os == 0) return 0; return strcpy(os, s); }