4 char base_char[] = "0123456789abcdefghijklmnopqrstuvwxyz";
7 __uitoa_internal(unsigned int value, char* str, int base, unsigned int* size)
11 str[ptr] = base_char[value % base];
16 for (unsigned int i = 0; i < (ptr >> 1); i++) {
18 str[i] = str[ptr - i - 1];
29 __itoa_internal(int value, char* str, int base, unsigned int* size)
31 if (value < 0 && base == 10) {
33 unsigned int _v = (unsigned int)(-value);
34 __uitoa_internal(_v, str + 1, base, size);
36 __uitoa_internal(value, str, base, size);
43 itoa(int value, char* str, int base)
45 return __itoa_internal(value, str, base, NULL);