36 lines
1.2 KiB
C
36 lines
1.2 KiB
C
|
/* ************************************************************************** */
|
||
|
/* */
|
||
|
/* ::: :::::::: */
|
||
|
/* ft_print_dicterror.c :+: :+: :+: */
|
||
|
/* +:+ +:+ +:+ */
|
||
|
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
|
||
|
/* +#+#+#+#+#+ +#+ */
|
||
|
/* Created: 2022/07/31 21:30:19 by cchauvet #+# #+# */
|
||
|
/* Updated: 2022/07/31 21:30:21 by cchauvet ### ########.fr */
|
||
|
/* */
|
||
|
/* ************************************************************************** */
|
||
|
|
||
|
#include "rush02.h"
|
||
|
|
||
|
int ft_nbr_error(char *str)
|
||
|
{
|
||
|
int i;
|
||
|
|
||
|
i = -1;
|
||
|
while (str[++i] != ':')
|
||
|
{
|
||
|
if (!(str[i] >= '0' && str[i] <= '9') && str[i] != ' ')
|
||
|
return (0);
|
||
|
}
|
||
|
return (1);
|
||
|
}
|
||
|
|
||
|
int ft_print_dicterror(char *str)
|
||
|
{
|
||
|
if (ft_nbr_error(str) == 0)
|
||
|
{
|
||
|
return (0);
|
||
|
}
|
||
|
return (1);
|
||
|
}
|