Adding the libft

This commit is contained in:
Raphael 2024-10-31 17:24:36 +01:00
parent 1b98b537b7
commit c947e43e51
62 changed files with 2098 additions and 19 deletions

26
libft/char/ft_isalpha.c Normal file
View file

@ -0,0 +1,26 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isalpha.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/11/06 11:58:37 by rparodi #+# #+# */
/* Updated: 2024/10/31 12:54:40 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/**
* @brief Check if the character is alpha
*
* @param c the character
* @return the character if alpha or 0 if not
*/
int ft_isalpha(int c)
{
if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))
return (c);
return (0);
}