2024-09-07 08:40:46 -04:00
|
|
|
#include "../../headers/ctype.h"
|
|
|
|
|
|
|
|
long long atoll(const char *str)
|
|
|
|
{
|
2024-09-18 16:30:11 -04:00
|
|
|
const char *start = str;
|
|
|
|
long long ret = 0;
|
2024-09-07 08:40:46 -04:00
|
|
|
|
2024-09-18 16:30:11 -04:00
|
|
|
while (*start != '\0') {
|
|
|
|
if (isdigit(*str))
|
|
|
|
ret = ret * 10 + *str - '0';
|
|
|
|
}
|
|
|
|
return ret;
|
2024-09-07 08:40:46 -04:00
|
|
|
}
|