aboutsummaryrefslogtreecommitdiff
path: root/c02/ex03
diff options
context:
space:
mode:
authorCabergs Charles <cacharle@e-r6-p7.s19.be>2019-07-05 09:52:18 +0200
committerCabergs Charles <cacharle@e-r6-p7.s19.be>2019-07-05 09:52:18 +0200
commit1efffca20580601c99fce13f0ade1b36ed5665a4 (patch)
treecb3b12beae45345a131d99a949f7708a0590d7da /c02/ex03
parentdbfa9d5d6b8bebde60f714253409ad46e328d358 (diff)
downloadpiscine-1efffca20580601c99fce13f0ade1b36ed5665a4.tar.gz
piscine-1efffca20580601c99fce13f0ade1b36ed5665a4.tar.bz2
piscine-1efffca20580601c99fce13f0ade1b36ed5665a4.zip
c02 tested
Diffstat (limited to 'c02/ex03')
-rw-r--r--c02/ex03/ft_str_is_numeric.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/c02/ex03/ft_str_is_numeric.c b/c02/ex03/ft_str_is_numeric.c
index 83ad454..b39f6bc 100644
--- a/c02/ex03/ft_str_is_numeric.c
+++ b/c02/ex03/ft_str_is_numeric.c
@@ -6,20 +6,15 @@
/* By: cacharle <charles.cabergs@gmail.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/07/03 19:26:04 by cacharle #+# #+# */
-/* Updated: 2019/07/04 10:31:44 by cacharle ### ########.fr */
+/* Updated: 2019/07/05 08:37:16 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
-int is_between(char start, char end, char subject)
-{
- return (subject >= start && subject <= end);
-}
-
int ft_str_is_numeric(char *str)
{
while (*str != '\0')
{
- if (!is_between('0', '9', *str))
+ if (!(*str >= '0' && *str <= '9'))
return (0);
str++;
}