iKael
Posts : 5 Points : 3711 Join date : 2014-10-07 Age : 33 Location : Drobeta Turnu Severin
| Subject: Number Format Wed Oct 08, 2014 7:43 am | |
| Suggestion Report IG Name: Michael GambinoName of the Suggestion: Number formatHow will this help our server: A simple code can be very useful. ex. instead of showing 100000000 => 100.000.000- Number format code:
stock number_format( num ) { new stri[16], stro[16], i, v, p, d, l, n = num < 0;
format( stri, sizeof( stri ), "%d", num * ( n ? -1 : 1 ) );
l = strlen( stri ) - 1; d = ( l - ( l % 3 ) ) / 3; l = l + 1; i = l + d; p = l;
while ( i >= 0 ) { v = l + d - i;
if ( v && !( v % 4 ) ) stro[i + n] = ','; else stro[i + n] = stri[p--];
i--; }
stro[0] = n ? '-' : stro[0];
return stro; } Is it exploitable: No | |
|