42_minishell/utils/ft_strncpy.c

15 lines
160 B
C
Raw Normal View History

2023-02-01 11:28:38 -05:00
#include "utils.h"
2023-02-14 01:26:18 -05:00
size_t ft_strncpy(char *dst, const char *src, size_t n)
2023-02-01 11:28:38 -05:00
{
size_t i;
i = 0;
while (i < n)
{
dst[i] = src[i];
i++;
}
return (i);
}