commit
This commit is contained in:
29
C_02/git_todo/ex08/ft_strlowcase.c
Normal file
29
C_02/git_todo/ex08/ft_strlowcase.c
Normal file
@@ -0,0 +1,29 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_strlowcase.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: gbaconni <marvin@42lausanne.ch> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2021/08/10 11:34:35 by gbaconni #+# #+# */
|
||||
/* Updated: 2021/08/10 11:40:03 by gbaconni ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
char *ft_strlowcase(char *str)
|
||||
{
|
||||
int i;
|
||||
int size;
|
||||
|
||||
size = 0;
|
||||
while (str[size++] != '\0')
|
||||
continue ;
|
||||
i = 0;
|
||||
while (i < size)
|
||||
{
|
||||
if (str[i] >= 'A' && str[i] <= 'Z')
|
||||
str[i] += 32;
|
||||
i++;
|
||||
}
|
||||
return (str);
|
||||
}
|
||||
Reference in New Issue
Block a user