ft_strncpy.c

This commit is contained in:
Timo Schmidt 2023-03-19 18:05:17 +01:00
parent 8d8799c509
commit e0eeb8dee5
1 changed files with 1 additions and 5 deletions

View File

@ -6,7 +6,7 @@
/* By: tischmid <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/03/19 10:25:26 by tischmid #+# #+# */
/* Updated: 2023/03/19 10:33:04 by tischmid ### ########.fr */
/* Updated: 2023/03/19 18:05:09 by tischmid ### ########.fr */
/* */
/* ************************************************************************** */
@ -16,13 +16,9 @@ char *ft_strncpy(char *dest, char *src, unsigned int n)
i = -1;
while (++i < n && src[i] != '\0')
{
dest[i] = src[i];
}
while (++i < n)
{
dest[i] = '\0';
}
return (dest);
}