Possible Input for The Extended Number Format String
Percentages and absolute numbers are formatted separately. For this two format strings are used, which follow the same rules and structure. In general the strings of characters in the format string are simply replaced in the input number. Exceptions to this rule would be scaling factors and the number of decimal places.
The elements of the format string are separated by the "|" character. Format strings with less than 7 elements (or 6 "|" characters) are considered invalid and therefore ignored. In this case the standard format without scaling and with one position after the decimal point is used.
The format string consists of the following elements, the ordering is obligatory and cannot be changed:
Negative|Prefix|Thousands|Decimal|Scaling|PointsAfterDecimal|Suffix
Negative | The prefix for negative numbers. The string "()" will result in the number placed inside parentheses, including eventual prefixes and suffixes. If None is used, the absolute number will be shown. |
Prefix | A prefixed string of characters, for example a currency symbol or an identifier for the scaling factor. |
Thousands | A separator for thousands. |
Decimal | A separator for the decimal places. |
Scaling | The scaling factor for the value. This can be given as a whole number or a power, formatted as n^m. A whole number will be calculated as a power to the basis 10 internally. In case of a given power the value will be divided by it directly. Even negative numbers are possible, for example "-3" or "10^-3"; in this case the value will get adequately higher. Non numeric inputs are ignored. Please note: given a "0" or a "1" will result in a scaling factor of 1. The only way to achieve a scaling by 10 is to set the input to "10^1". |
PointsAfterDecimal | The number of places after the decimal. |
Suffix | A suffix for the value, analogous to the prefix. |