This commit is contained in:
Camille Chauvet
2023-05-17 16:45:25 +00:00
commit 29ed24d567
619 changed files with 16119 additions and 0 deletions

View File

@ -0,0 +1,35 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_str_is_numeric.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: thellego <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/07/17 10:43:58 by thellego #+# #+# */
/* Updated: 2022/07/17 10:54:48 by thellego ### ########.fr */
/* */
/* ************************************************************************** */
int ft_str_is_numeric(char *str)
{
int counter;
counter = 0;
while (str[counter])
{
if (48 <= str[counter] && str[counter] <= 57)
{
counter++;
}
else
{
return (0);
}
}
return (1);
}
/* int main()
{
char tab1[120] = "0123456789iiiiijd;s";
ft_str_is_numeric(tab1);
}*/