number using the values in
format as a monetary value and returns the
result. The format string begins with a percent sign (
%) and consists of the following elements,
in order. Except for the conversion character, the specifiers are all
One or more flags as shown below:
An equals sign followed by a character to be used as the fill character; defaults to the space character.
If present, disables the use of grouping characters (for example, 1000 instead of 1,000) as defined by the locale.
If present, positive numbers are prefaced with +.
If present, the currency symbol is not put in the resulting string.
If present, all fields are left-justified and padded to the right with the fill character. By default, fields are right-justified and padded to the left with the fill character.
A number indicating the minimum field width. The resulting number is padded to at least this many characters; the default is 0.
A number sign (
A period (
If specified, the number is formatted according to the locale’s international currency format (for example, USD 1,234.56).
If specified, the number is formatted according to the locale’s local currency format (for example, $1234.56).
Formats the result as a
percentage, inserting a percentage (