feat: add ft_strlcpy function

This commit is contained in:
2025-10-04 16:29:07 +02:00
parent b88037b15a
commit 3e543ced2f
2 changed files with 28 additions and 0 deletions

View File

@@ -80,4 +80,12 @@ void *ft_memcpy(void *dst, const void *src, size_t n);
*/
void *ft_memmove(void *dst, const void *src, size_t n);
/*
strlcpy() copies up to dstsize - 1
characters from the string src to
dst, NUL-terminating the result if
dstsize is not 0.
*/
size_t ft_strlcpy(char *dst, const char *src, size_t dstsize);
#endif