init
This commit is contained in:
30
Correction/thellego/ex08/ft_strlowcase.c
Normal file
30
Correction/thellego/ex08/ft_strlowcase.c
Normal file
@ -0,0 +1,30 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_strlowcase.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: thellego <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2022/07/17 13:07:13 by thellego #+# #+# */
|
||||
/* Updated: 2022/07/17 13:10:03 by thellego ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
char *ft_strlowcase(char *str)
|
||||
{
|
||||
int counter;
|
||||
|
||||
counter = 0;
|
||||
while (str[counter])
|
||||
{
|
||||
if (65 <= str[counter] && str[counter] <= 90)
|
||||
str[counter] = str[counter] + 32;
|
||||
counter++;
|
||||
}
|
||||
return (str);
|
||||
}
|
||||
/* int main(){
|
||||
char tab1[120] = "Hfdh HELLO WORLD /.,'[-009";
|
||||
ft_strlowcase(tab1);
|
||||
printf("%s", tab1);
|
||||
} */
|
Reference in New Issue
Block a user