adding ft_isspace
This commit is contained in:
26
srcs/ft_isspace.c
Normal file
26
srcs/ft_isspace.c
Normal file
@@ -0,0 +1,26 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_isalpha.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: hulamy <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2019/11/25 13:55:15 by hulamy #+# #+# */
|
||||
/* Updated: 2019/11/25 13:55:17 by hulamy ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libft.h"
|
||||
|
||||
#define SPACE ' '
|
||||
#define FORM_FEED '\f'
|
||||
#define NEWLINE '\n'
|
||||
#define CARRIAGE_RETURN '\r'
|
||||
#define HORIZONTAL_TAB '\t'
|
||||
#define VERTICAL_TAB '\v'
|
||||
|
||||
int ft_isspace(int c)
|
||||
{
|
||||
return (c == SPACE || c == FORM_FEED || c == NEWLINE ||
|
||||
c == CARRIAGE_RETURN || c == HORIZONTAL_TAB || c == VERTICAL_TAB);
|
||||
}
|
||||
Reference in New Issue
Block a user