ft_isascii: initial implementation

This commit is contained in:
Khaïs COLIN 2024-10-14 15:01:01 +02:00
parent 04a860d2b2
commit 359cc601e9
2 changed files with 22 additions and 2 deletions

View file

@ -6,7 +6,7 @@
# By: kcolin <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2024/10/14 13:43:59 by kcolin #+# #+# #
# Updated: 2024/10/14 14:49:30 by kcolin ### ########.fr #
# Updated: 2024/10/14 14:57:24 by kcolin ### ########.fr #
# #
# **************************************************************************** #
@ -14,7 +14,8 @@ NAME = libft.a
CFLAGS = -Wall -Wextra -Werror -ggdb
SOURCES = ft_isalpha.c \
ft_isdigit.c \
ft_isalnum.c
ft_isalnum.c \
ft_isascii.c
OBJECTS = $(SOURCES:.c=.o)
CC = gcc

19
ft_isascii.c Normal file
View file

@ -0,0 +1,19 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isascii.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: kcolin <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/10/14 14:57:45 by kcolin #+# #+# */
/* Updated: 2024/10/14 15:00:06 by kcolin ### ########.fr */
/* */
/* ************************************************************************** */
int ft_isascii(int c)
{
if (c >= 0x0 && c <= 0x7f)
return (1);
else
return (0);
}