29.06.2012, 23:34
An optional currency sign would be rather useful. You can't just do this:
Because you'll get numbers like:
$-100,000,000
The - should be right at the beginning. I know it's not hard to make a function that simply inserts a dollar sign after the - (or at the beginning of the string if no - is there), but I feel as though a function called FormatNumber should also be able to format the number into a currency. Would be more efficient than creating another tack-on function too.
Love your work!
pawn Код:
format(string, sizeof(string), "$%s", NumberFormat(-123456789));
$-100,000,000
The - should be right at the beginning. I know it's not hard to make a function that simply inserts a dollar sign after the - (or at the beginning of the string if no - is there), but I feel as though a function called FormatNumber should also be able to format the number into a currency. Would be more efficient than creating another tack-on function too.
Love your work!