-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_isalnum.c
45 lines (38 loc) · 1.52 KB
/
ft_isalnum.c
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
36
37
38
39
40
41
42
43
44
45
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isalnum.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: sperez-p <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/08/20 12:44:38 by sperez-p #+# #+# */
/* Updated: 2021/08/20 12:44:40 by sperez-p ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/*
NAME
****
ft_isalnum ---> is an alphanumeric character
SYNOPSIS
***********
#include <ctype.h>
int isalnum(int c);
#include "libft.h"
int ft_isalnum(int c);
DESCRIPTION
***********
The function ft_isalnum() mimics the behavior of the isalnum() function from
ctype C library. Both functions check for an alphanumeric character.
PARAMETERS
**********
c ---> The character to be checked.
RETURN VALUE
************
- Non-zero value if c is a digit or a letter.
- Zero value if not.
*/
int ft_isalnum(int c)
{
return (ft_isalpha(c) || ft_isdigit(c));
}