36 lines
1.2 KiB
C
36 lines
1.2 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_strlowcase.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: whaffman <whaffman@student.codam.nl> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2024/06/06 15:57:01 by whaffman #+# #+# */
|
|
/* Updated: 2024/06/09 17:25:15 by whaffman ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
char *ft_strlowcase(char *str)
|
|
{
|
|
char *org_str;
|
|
|
|
org_str = str;
|
|
while (*str)
|
|
{
|
|
if (*str >= 'A' && *str <= 'Z')
|
|
*str = *str - 'A' + 'a';
|
|
str++;
|
|
}
|
|
return (org_str);
|
|
}
|
|
/*
|
|
#include <stdio.h>
|
|
int main(void)
|
|
{
|
|
char str[] = "Hello, World!";
|
|
ft_strlowcase(&str[0]);
|
|
printf("%s", str);
|
|
return (0);
|
|
}
|
|
*/
|