-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_str_is_numeric.c
22 lines (21 loc) · 1.02 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_str_is_numeric.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: dbrophy <dbrophy@student.42.us.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/10/28 19:10:03 by dbrophy #+# #+# */
/* Updated: 2019/10/28 19:17:22 by dbrophy ### ########.fr */
/* */
/* ************************************************************************** */
int ft_str_is_numeric(char *str)
{
if (*str == 0)
return (0);
str--;
while (*(++str))
if (*str < '0' || *str > '9')
return (0);
return (1);
}