banan-os/libc/string/strcpy.cpp

10 lines
176 B
C++
Raw Normal View History

2022-11-12 23:47:06 +02:00
#include <string.h>
2022-11-14 00:27:11 +02:00
char* strcpy(char* __restrict dest, const char* __restrict src)
2022-11-12 23:47:06 +02:00
{
size_t i;
for (i = 0; src[i]; i++)
dest[i] = src[i];
dest[i] = '\0';
return dest;
}