aboutsummaryrefslogtreecommitdiff
path: root/src/str
diff options
context:
space:
mode:
Diffstat (limited to 'src/str')
-rw-r--r--src/str/ft_strtoupper.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/str/ft_strtoupper.c b/src/str/ft_strtoupper.c
index 4a751d3..5dcfac6 100644
--- a/src/str/ft_strtoupper.c
+++ b/src/str/ft_strtoupper.c
@@ -6,21 +6,23 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/10 04:12:04 by cacharle #+# #+# */
-/* Updated: 2020/02/14 02:49:35 by cacharle ### ########.fr */
+/* Updated: 2020/08/02 14:14:17 by charles ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft_str.h"
-#include "libft_ctype.h"
char *ft_strtoupper(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_toupper(s[i]);
+ i++;
+ }
return (s);
}