aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2021-01-31 02:36:03 +0100
committerCharles Cabergs <me@cacharle.xyz>2021-01-31 02:36:03 +0100
commit9e88392537ee8863d5479b8395676e1517c9aef0 (patch)
tree5478e409234a45fdcef17992c232287987c587ec
parent64b7d55ed56c8696bc5580c6ca73e1ce4ebfab50 (diff)
parent930570b3b90ae956b1a58ff8e9fefa1fbdcfd304 (diff)
downloadlibft-9e88392537ee8863d5479b8395676e1517c9aef0.tar.gz
libft-9e88392537ee8863d5479b8395676e1517c9aef0.tar.bz2
libft-9e88392537ee8863d5479b8395676e1517c9aef0.zip
Merge branch 'master' of git.cacharle.xyz:/srv/git/libft
-rw-r--r--src/str/ft_strtolower.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/str/ft_strtolower.c b/src/str/ft_strtolower.c
index 2eb34c2..69efe21 100644
--- a/src/str/ft_strtolower.c
+++ b/src/str/ft_strtolower.c
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/10 04:10:01 by cacharle #+# #+# */
-/* Updated: 2020/02/10 04:12:21 by cacharle ### ########.fr */
+/* Updated: 2020/10/15 08:54:49 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
@@ -15,12 +15,15 @@
char *ft_strtolower(char *s)
{
- int i;
+ size_t i;
if (s == NULL)
return (NULL);
- i = -1;
- while (s[i])
+ i = 0;
+ while (s[i] != '\0')
+ {
s[i] = ft_tolower(s[i]);
+ i++;
+ }
return (s);
}