-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathft_ispunct.c
28 lines (26 loc) · 1.24 KB
/
ft_ispunct.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_ispunct.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: apuchill <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/01/26 14:42:00 by apuchill #+# #+# */
/* Updated: 2020/10/30 19:55:09 by apuchill ### ########.fr */
/* */
/* ************************************************************************** */
/*
** LIBRARY: <ctype.h>
** SYNOPSIS: punctuation character test
**
** DESCRIPTION:
** The ispunct() function tests for any printing character, except for
** space (` ') or a character for which isalnum(3) is true.
*/
int ft_ispunct(int c)
{
if ((c >= 33 && c <= 47) || (c >= 58 && c <= 64) || (c >= 91 && c <= 96) ||
(c >= 123 && c <= 126))
return (1);
return (0);
}