minishell
ft_isspace.c
Go to the documentation of this file.
1
/* ************************************************************************** */
2
/* */
3
/* ::: :::::::: */
4
/* ft_isspace.c :+: :+: :+: */
5
/* +:+ +:+ +:+ */
6
/* By: kfujita <kfujita@student.42tokyo.jp> +#+ +:+ +#+ */
7
/* +#+#+#+#+#+ +#+ */
8
/* Created: 2023/01/30 12:56:27 by kfujita #+# #+# */
9
/* Updated: 2023/05/05 23:14:57 by kfujita ### ########.fr */
10
/* */
11
/* ************************************************************************** */
12
13
#include "
ft_is.h
"
14
15
int
ft_isspace
(
int
c)
16
{
17
unsigned
char
uc;
18
19
uc = (
unsigned
char)c;
20
return
(
21
uc ==
CHAR_HTAB
22
|| uc ==
CHAR_LF
23
|| uc ==
CHAR_VTAB
24
|| uc ==
CHAR_FF
25
|| uc ==
CHAR_CR
26
|| uc ==
CHAR_WS
27
);
28
}
29
30
int
ft_isspcornil
(
int
c)
31
{
32
unsigned
char
uc;
33
34
uc = (
unsigned
char)c;
35
return
(
36
uc ==
'\0'
37
||
ft_isspace
(c)
38
);
39
}
ft_is.h
CHAR_HTAB
#define CHAR_HTAB
Definition:
ft_is.h:16
CHAR_WS
#define CHAR_WS
Definition:
ft_is.h:21
CHAR_CR
#define CHAR_CR
Definition:
ft_is.h:20
CHAR_LF
#define CHAR_LF
Definition:
ft_is.h:17
CHAR_FF
#define CHAR_FF
Definition:
ft_is.h:19
CHAR_VTAB
#define CHAR_VTAB
Definition:
ft_is.h:18
ft_isspace
int ft_isspace(int c)
Definition:
ft_isspace.c:15
ft_isspcornil
int ft_isspcornil(int c)
Definition:
ft_isspace.c:30
libft
ft_is
ft_isspace.c
Generated by
1.9.1