[#bsl-MaxDecimalStringLengths] = xref:bsl.adoc[bsl]::MaxDecimalStringLengths :relfileprefix: ../ :mrdocs: Upper bounds on decimal string lengths for scalar numeric types. == Synopsis Declared in `<bslstl_string.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- enum MaxDecimalStringLengths; ---- == Description This `enum` give upper bounds on the maximum string lengths storing each scalar numerical type, and the starting value for `long double` that can get way too long for stack storage when printed. It is safe to use stack‐allocated buffers of these sizes for generating decimal representations of the corresponding type, including sign and terminating null character, using the default precision of 6 significant digits for floating point types. == Members [cols="1,4"] |=== | Name| Description | `e_MAX_SHORT_STRLEN10` | Maximum decimal string length for a `short`, including sign and null. | `e_MAX_INT_STRLEN10` | Maximum decimal string length for an `int`, including sign and null. | `e_MAX_INT64_STRLEN10` | Maximum decimal string length for a 64‐bit integer. | `e_MAX_FLOAT_STRLEN10` | Maximum string length for a `float` in base‐10, including sign and null terminator. | `e_MAX_DOUBLE_STRLEN10` | Maximum decimal string length for a `double`. | `e_MAX_LONGDOUBLE_STRLEN10` | Maximum decimal string length for a `long double`. | `e_MAX_SCALAR_STRLEN10` | Maximum decimal string length among scalar integer types. | `e_STARTING_LONGDOUBLE_STRLEN10` | Initial stack buffer size for printing a `long double`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#