-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathft_isalnum.c
More file actions
35 lines (32 loc) · 1.44 KB
/
Copy pathft_isalnum.c
File metadata and controls
35 lines (32 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isalnum.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cado-car <cado-car@student.42sp.org.br> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/07/30 20:21:31 by cado-car #+# #+# */
/* Updated: 2021/07/30 20:21:31 by cado-car ### ########lyon.fr */
/* */
/* ************************************************************************** */
/*
* LIBRARY
* #include <ctype.h>
* DESCRIPTION
* The isalnum() function tests for any character for which isalpha(3) or
* isdigit(3) is true. The value of the argument must be representable as an
* unsigned char or the value of EOF.
* PARAMETERS
* #1. The character to test.
* RETURN VALUES
* The isalnum() function returns zero if the character tests false and returns
* non-zero if the character tests true.
*/
#include "libft.h"
int ft_isalnum(int c)
{
if ((ft_isalpha(c) != 0) || (ft_isdigit(c) != 0))
return (1);
else
return (0);
}