ft_alnum: initial implementation

This commit is contained in:
Khaïs COLIN 2024-10-14 14:54:43 +02:00
parent e5601d44ab
commit 04a860d2b2
2 changed files with 24 additions and 2 deletions

21
ft_isalnum.c Normal file
View file

@ -0,0 +1,21 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isalnum.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: kcolin <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/14 14:49:45 by kcolin #+# #+# */
/* Updated: 2024/10/14 14:52:26 by kcolin ### ########.fr */
/* */
/* ************************************************************************** */
int ft_isalnum(int c)
{
if ((c >= 'A' && c <= 'Z')
|| (c >= 'a' && c <= 'z')
|| (c >= '0' && c <= '9'))
return (1);
else
return (0);
}