ft_alnum: initial implementation
This commit is contained in:
parent
e5601d44ab
commit
04a860d2b2
2 changed files with 24 additions and 2 deletions
21
ft_isalnum.c
Normal file
21
ft_isalnum.c
Normal 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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue