ft_tolower: initial implementation
This commit is contained in:
parent
21e04cc22c
commit
1eb276c8cf
3 changed files with 40 additions and 2 deletions
36
ft_tolower.c
Normal file
36
ft_tolower.c
Normal 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);
|
||||
}
|
||||
*/
|
||||
Loading…
Add table
Add a link
Reference in a new issue