Move code to the "src" subdirectory
This commit is contained in:
15
src/util.c
Normal file
15
src/util.c
Normal file
@@ -0,0 +1,15 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "util.h"
|
||||
|
||||
char *String_Copy(char *str) {
|
||||
char *strnew;
|
||||
int len;
|
||||
len = strlen(str);
|
||||
strnew = malloc(len + 1);
|
||||
strcpy(strnew, str);
|
||||
return (strnew);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user