-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_strtolower.c
29 lines (26 loc) · 1.08 KB
/
ft_strtolower.c
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
27
28
29
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strtolower.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: asarandi <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2017/09/28 15:16:29 by asarandi #+# #+# */
/* Updated: 2017/09/28 15:18:03 by asarandi ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_strtolower(char *s)
{
size_t i;
size_t k;
i = ft_strlen(s);
k = 0;
while (k < i)
{
if ((s[k] >= 'A') && (s[k] <= 'Z'))
s[k] = ft_tolower(s[k]);
k++;
}
return (s);
}