mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-07-05 20:39:16 +00:00
feat(userspace/libc): implement strcpy function
Add strcpy implementation in string.c Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
@ -84,7 +84,15 @@ export int strcoll(const char *s1, const char *s2)
|
||||
}
|
||||
|
||||
export int strcoll_l(const char *, const char *, locale_t);
|
||||
export char *strcpy(char *restrict, const char *restrict);
|
||||
|
||||
export char *strcpy(char *restrict s1, const char *restrict s2)
|
||||
{
|
||||
char *dest = s1;
|
||||
while (*s2)
|
||||
*dest++ = *s2++;
|
||||
*dest = '\0';
|
||||
return s1;
|
||||
}
|
||||
|
||||
export size_t strcspn(const char *s1, const char *s2)
|
||||
{
|
||||
|
Reference in New Issue
Block a user