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_strchr.c | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) (limited to 'ft_strchr.c') diff --git a/ft_strchr.c b/ft_strchr.c index 67b969e..048b2ec 100644 --- a/ft_strchr.c +++ b/ft_strchr.c @@ -1,17 +1,29 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strchr.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cacharle +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2019/10/07 10:14:47 by cacharle #+# #+# */ +/* Updated: 2019/10/07 10:40:04 by cacharle ### ########.fr */ +/* */ +/* ************************************************************************** */ + #include -char *ft_strchr(const char *s, int c) +char *ft_strchr(const char *s, int c) { - char *cursor; + char *cursor; - cursor = (char*)s; - while (*cursor) - { - if (*cursor == (char)c) - return (cursor); - cursor++; - } - if (c == 0) - return (cursor); - return (NULL); + cursor = (char*)s; + while (*cursor) + { + if (*cursor == (char)c) + return (cursor); + cursor++; + } + if (c == 0) + return (cursor); + return (NULL); } -- cgit