/** * String utils. */ #include #include #include "eglstring.h" char * _eglstrdup(const char *s) { if (s) { size_t l = strlen(s); char *s2 = malloc(l + 1); if (s2) strcpy(s2, s); return s2; } return NULL; }