aboutsummaryrefslogtreecommitdiff
path: root/src/str/ft_atoi.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/str/ft_atoi.c')
-rw-r--r--src/str/ft_atoi.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/str/ft_atoi.c b/src/str/ft_atoi.c
index fa31407..b8f979d 100644
--- a/src/str/ft_atoi.c
+++ b/src/str/ft_atoi.c
@@ -6,12 +6,19 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/10/07 09:46:16 by cacharle #+# #+# */
-/* Updated: 2020/01/15 10:56:06 by cacharle ### ########.fr */
+/* Updated: 2020/04/04 22:34:33 by charles ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
+/*
+** \brief Extract first int in a string
+** (takes as much digits has possible)
+** \param str String to convert
+** \return Extracted int
+*/
+
int ft_atoi(const char *str)
{
return ((int)ft_strtol(str, (char**)NULL, 10));