Files
yait/lib/str_dup.c
2025-09-28 22:06:44 -04:00

13 lines
175 B
C

#include <stdlib.h>
#include <string.h>
#include "xmem.h"
#include "str_dup.h"
char *str_dup(char *s)
{
char *new = xmalloc(strlen(s) + 1);
strcpy(new, s);
return new;
}