I tried to make my own itoa() function. I did it just for fun:

Am I doing anything wrong here? Do you have any suggestions what I could do better when developing such functions?Code:`char* myitoa(int number,char* buffer,int radix){`

int increment=1,n,num;

char temp[32];

radix%=37;

for(n=0;number>0;n++){

increment*=radix;

num=(number%increment)/(increment/radix);

temp[n]=num+0x30;

if(num>9){

temp[n]+=7;

}

number-=num*(increment/radix);

}

for(int i=0;i<n;i++){

buffer[n-1-i]=temp[i];

}

buffer[n]='\0';

return buffer;

}