feat: implemented strcpy, used constant

This commit is contained in:
2021-01-30 20:20:12 +01:00
parent 5a1caef5b1
commit 468d5968a9
3 changed files with 8 additions and 2 deletions

View File

@@ -14,6 +14,10 @@ int memcpy(char *dst, char *src, int amount) {
return 0;
}
int strcpy(char *dst, char *src) {
return memcpy(dst, src, strlen(src) + 1);
}
int memset(char *dst, char data, int amount) {
for (int i = 0; i < amount; ++i) {
dst[i] = data;