aboutsummaryrefslogtreecommitdiff
path: root/libft/src/str/ft_strtolower.c
blob: 2eb34c202b39f979ed8e5a6759a141c0e05a03cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   ft_strtolower.c                                    :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: cacharle <marvin@42.fr>                    +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2020/02/10 04:10:01 by cacharle          #+#    #+#             */
/*   Updated: 2020/02/10 04:12:21 by cacharle         ###   ########.fr       */
/*                                                                            */
/* ************************************************************************** */

#include "libft_str.h"
#include "libft_ctype.h"

char	*ft_strtolower(char *s)
{
	int	i;

	if (s == NULL)
		return (NULL);
	i = -1;
	while (s[i])
		s[i] = ft_tolower(s[i]);
	return (s);
}