Constructors
Synopses
Declared in <bdldfp_decimalformatconfig.h>
Create an object of this class having the default attribute values.
Create an object of this class having the specified precision to control how many digits are written after a decimal point.
explicit
DecimalFormatConfig(
int precision,
Style style = e_NATURAL,
Sign sign = e_NEGATIVE_ONLY,
char const* infinity = "inf",
char const* nan = "nan",
char const* snan = "snan",
char point = '.',
char exponent = 'e',
bool showpoint = false,
int expWidth = 2);
Parameters
Name |
Description |
precision |
number of digits written after the decimal point |
style |
how the decimal number is written |
sign |
how the sign is output |
infinity |
string used to output an infinity value |
nan |
string used to output a NaN value |
snan |
string used to output a signaling NaN value |
point |
character used for decimal points |
exponent |
character used for the exponent |
showpoint |
whether a decimal point is always displayed |
expWidth |
minimum number of digits used to write the exponent |
Created with MrDocs