ft_isascii: initial implementation
This commit is contained in:
parent
04a860d2b2
commit
359cc601e9
2 changed files with 22 additions and 2 deletions
5
Makefile
5
Makefile
|
|
@ -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
19
ft_isascii.c
Normal 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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue