From 10b4feb67c8af2b099dabd66f948b02e180bae0d Mon Sep 17 00:00:00 2001 From: Cabergs Charles Date: Mon, 7 Oct 2019 11:35:51 +0200 Subject: Normed everything Created a few dummy functions to resolve functions having more than 25 lines. --- ft_strncpy.c | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) (limited to 'ft_strncpy.c') diff --git a/ft_strncpy.c b/ft_strncpy.c index 100c813..4a4efed 100644 --- a/ft_strncpy.c +++ b/ft_strncpy.c @@ -1,16 +1,28 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strncpy.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/10/07 10:26:59 by cacharle #+# #+# */ +/* Updated: 2019/10/07 10:28:17 by cacharle ### ########.fr */ +/* */ +/* ************************************************************************** */ + #include -char *ft_strncpy(char *dest, const char *src, size_t n) +char *ft_strncpy(char *dest, const char *src, size_t n) { - size_t i; + size_t i; - i = 0; - while (src[i] && i < n) - { - dest[i] = src[i]; - i++; - } - while (i < n) - dest[i++] = '\0'; - return (dest); + i = 0; + while (src[i] && i < n) + { + dest[i] = src[i]; + i++; + } + while (i < n) + dest[i++] = '\0'; + return (dest); } -- cgit