exit sur la sortie d'erreure et parsing des variables $ mieux
This commit is contained in:
24
libft/ft_strisnbr.c
Executable file
24
libft/ft_strisnbr.c
Executable file
@ -0,0 +1,24 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_strisnbr.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: tomoron <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/02/11 17:14:58 by tomoron #+# #+# */
|
||||
/* Updated: 2024/02/12 03:21:56 by tomoron ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
int ft_strisnbr(char *str)
|
||||
{
|
||||
if(!str)
|
||||
return(0);
|
||||
while(*str)
|
||||
{
|
||||
if(*str < '0' || *str > '9')
|
||||
return(0);
|
||||
str++;
|
||||
}
|
||||
return(1);
|
||||
}
|
Reference in New Issue
Block a user