42_minishell/utils/ft_strncpy.c

15 lines
160 B
C
Raw Permalink Normal View History

2023-02-01 11:28:38 -05:00
#include "utils.h"
2023-02-09 12:47:05 -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);
}