FENIX_libc/string/strcpy.c

16 lines
246 B
C
Raw Normal View History

2022-10-09 16:48:26 +00:00
#include <string.h>
char * strcpy(char * restrict dest, const char * restrict src) {
char * to = dest;
const char * from = src;
size_t i;
for(i = 0; from[i] != '\0'; i++) {
to[i] = from[i];
}
to[i] = from[i];
return dest;
}