add libft, add gitignore

This commit is contained in:
2024-11-27 17:49:04 +01:00
parent b19228dccd
commit 3c467a5fd5
70 changed files with 2655 additions and 3 deletions

26
libft/ft_strisnbr.c Executable file
View File

@ -0,0 +1,26 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strisnbr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/02/11 17:14:58 by tomoron #+# #+# */
/* Updated: 2024/02/16 16:13:38 by tomoron ### ########.fr */
/* */
/* ************************************************************************** */
int ft_strisnbr(char *str)
{
if (!str)
return (0);
if (*str == '+' || *str == '-')
str++;
while (*str)
{
if (*str < '0' || *str > '9')
return (0);
str++;
}
return (1);
}