ft_tolower: initial implementation

This commit is contained in:
Khaïs COLIN 2024-10-16 10:32:29 +02:00
parent 21e04cc22c
commit 1eb276c8cf
3 changed files with 40 additions and 2 deletions

36
ft_tolower.c Normal file
View file

@ -0,0 +1,36 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_tolower.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: kcolin <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/16 10:30:41 by kcolin #+# #+# */
/* Updated: 2024/10/16 10:31:43 by kcolin ### ########.fr */
/* */
/* ************************************************************************** */
int ft_tolower(int c)
{
if (c >= 'A' && c <= 'Z')
c += 0x20;
return (c);
}
/*
#include <stdio.h>
#include <ctype.h>
int main(void)
{
int i;
i = 0;
while (i < 256)
{
printf("%d\t%c\t%c\t%c\n", i, i, ft_tolower(i), tolower(i));
i++;
}
return (0);
}
*/