-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_isspace.c
More file actions
42 lines (40 loc) · 1.35 KB
/
ft_isspace.c
File metadata and controls
42 lines (40 loc) · 1.35 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
36
37
38
39
40
41
42
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isspace.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: sudaniel <sudaniel@student.42heilbronn.de +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/01/17 08:02:51 by sudaniel #+# #+# */
/* Updated: 2025/01/17 08:31:01 by sudaniel ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
#include <ctype.h>
int ft_isspace(int c)
{
if ((c >= 9 && c <= 13) || c == ' ')
return (1);
return (0);
}
/*
int main(void)
{
char *s = "\tH\va\fl\rl\no ";
while (*s)
{
if (ft_isspace(*s))
{
ft_printf("ft: I am a space, %d\n", ft_isspace(*s));
ft_printf("is: I am a space, %d\n", isspace(*s));
}
else
{
ft_printf("ft: I am not a space, %d\n", ft_isspace(*s));
ft_printf("is: I am not a space, %d\n", isspace(*s));
}
s++;
}
return (0);
}
*/