libft/char/ft_isascii.c
Raphael 7051eaf1bf
fix(char): fixing the isascii / isprint
- Correcting the behavour of is ascii to the original given by the
original function
2025-09-05 10:47:02 +02:00

26 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isascii.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/06 14:04:26 by rparodi #+# #+# */
/* Updated: 2025/09/05 10:40:03 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
/**
* @brief Check if the character is in the ascii table
*
* @param c the character
* @return the character if in the ascii table or 0 if not
*/
int ft_isascii(int c)
{
if (c == 0)
return (1);
if (c > 0 && c <= 127)
return (1);
return (0);
}