feat: add ft_isprint function

This commit is contained in:
2025-09-29 20:02:40 +02:00
parent 68e6c61de9
commit a53f74af41
2 changed files with 14 additions and 1 deletions

6
ft_isprint.c Normal file
View File

@@ -0,0 +1,6 @@
#include "libft.h"
int ft_isprint(int c)
{
return ((32 <= c && c <= 126));
}

View File

@@ -2,7 +2,7 @@
#define LIBFT_A
/*
The isalpha() function tests for
The ft_isalpha() function tests for
any character for which isupper(3) or
islower(3) is true.
*/
@@ -32,4 +32,11 @@ int ft_isalnum(int c);
*/
int ft_isascii(int c);
/*
The ft_isprint() function tests for
any printing character, including
space ( ).
*/
int ft_isprint(int c);
#endif