libft/char/ft_isascii.c
Raphael 1c607fced3
refactor(char): normed the char functions
- Norme was not passed after the modification but corrected now
2025-09-04 11:48:50 +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/04 11:41:42 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 (c);
return (0);
}