📄 atol.c
字号:
/* * Simple atol() * by Nicolas Pitre <nico@cam.org> * * This is usually found in stdlib.h, but folded in string.h for now. */#include <bios/string.h>longatol (const char *str){ register long x = 0; long neg; while (*str == ' ') str++; if (*str == '-') { neg = -1; str++; } else neg = 1; while (*str && *str >= '0' && *str <= '9') { x *= 10; x += (*str++) - '0'; } return x * neg;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -