The Black Art of Optimising -- www.volker-lanz.de: "static unsigned int itoa(char* p, unsigned int n)
{
char tmp[MAX_DIGITS + 1];
char* s = tmp + MAX_DIGITS;
*s = 0;
do
{
*--s = '0123456789'[n % 10];
n /= 10;
} while (n > 0);
strcpy(p, s);
return tmp + MAX_DIGITS - s;
}"
No comments:
Post a Comment