#include "../ft_is/ft_is.h"
#include "../ft_math/ft_math.h"
#include <stddef.h>
Go to the source code of this file.
|
| static bool | set_value (char c, int *value, int sign) |
| |
| bool | ft_atoi_strict (const char *str, const char **endptr, int *dst) |
| |
◆ ft_atoi_strict()
| bool ft_atoi_strict |
( |
const char * |
str, |
|
|
const char ** |
endptr, |
|
|
int * |
dst |
|
) |
| |
Definition at line 32 of file ft_atoi_strict.c.
36 if (str == NULL || dst == NULL)
43 if (*str ==
'-' || *str ==
'+')
static bool set_value(char c, int *value, int sign)
◆ set_value()
| static bool set_value |
( |
char |
c, |
|
|
int * |
value, |
|
|
int |
sign |
|
) |
| |
|
static |
Definition at line 19 of file ft_atoi_strict.c.
25 c_value = (c -
'0') * sign;
28 *value = (*value * 10) + c_value;
bool can_add(int a, int b)
bool can_mul(int a, int b)