-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_str_is_numeric.c
25 lines (23 loc) · 1.03 KB
/
ft_str_is_numeric.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_str_is_numeric.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: nkuzminy <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/07/21 12:58:22 by nkuzminy #+# #+# */
/* Updated: 2022/07/21 16:00:27 by nkuzminy ### ########.fr */
/* */
/* ************************************************************************** */
int ft_str_is_numeric(char *str)
{
int i;
i = 0;
while (str[i] != '\0')
{
if ((str[i] < '0') || (str[i] > '9'))
return (0);
i++;
}
return (1);
}