This commit is contained in:
starnakin 2023-07-23 19:20:51 +02:00
parent f9fa2a5a12
commit c688cfc4b1
3 changed files with 12 additions and 6 deletions

View File

@ -9,9 +9,11 @@ strcat(dst, src)
i++;
}
loop {
[dst + i + j] = [src + j];
if ([src + j] == 0)
return (dst);
break;
[dst + i + j] = [src + j];
j++;
}
[dst + i + j] = 0;
return j;
}

View File

@ -3,9 +3,11 @@ strcpy(dst, src)
local i = 0;
loop {
[dst + i] = [src + i];
if ([src + i] == 0)
return (dst);
break;
[dst + i] = [src + i];
i++;
}
[dst + i] = 0;
return i;
}

View File

@ -3,9 +3,11 @@ strncpy(dst, src, size)
local i = 0;
loop {
if ([src + i] == 0 | i >= size)
break;
[dst + i] = [src + i];
if ([src + i] == 0 | i + 1 >= size)
return (dst);
i++;
}
[dst + i] = 0;
return i;
}