2023-02-21 08:35:08 -05:00
|
|
|
/* ************************************************************************** */
|
|
|
|
/* */
|
|
|
|
/* ::: :::::::: */
|
|
|
|
/* ft_strncpy.c :+: :+: :+: */
|
|
|
|
/* +:+ +:+ +:+ */
|
|
|
|
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
|
|
|
|
/* +#+#+#+#+#+ +#+ */
|
|
|
|
/* Created: 2023/02/21 12:59:16 by cchauvet #+# #+# */
|
|
|
|
/* Updated: 2023/02/21 12:59:19 by cchauvet ### ########.fr */
|
|
|
|
/* */
|
|
|
|
/* ************************************************************************** */
|
|
|
|
|
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);
|
|
|
|
}
|