1 2 3 4 5 6 7 8 9
long strยทatoi(char *s) { long n = 0; while(*s) n = 10*n + (*s++ - '0'); return n; }