[#BloombergLP-bslalg-NumericFormatterUtil-ToCharsMaxLength] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::xref:BloombergLP/bslalg/NumericFormatterUtil.adoc[NumericFormatterUtil]::ToCharsMaxLength :relfileprefix: ../../../ :mrdocs: Minimum buffer size for `toChars` conversion of `TYPE`. == Synopsis Declared in `<bslalg_numericformatterutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class TYPE, int ARG = k_MAXLEN_ARG_DEFAULT> struct ToCharsMaxLength; ---- == Description This `struct` template implements the meta‐function to determine the minimum sufficient size of a buffer to successfully convert any numeric value of a specified `TYPE` supported by one of the `toChars` function overloads in `NumericFormatterUtil`. The meta‐function allows specifying an argument value to the `toChars` overloads, as a non‐type template parameter. That value stands for the `base` parameter for integral conversions, and the `format` parameter for floating point conversions. A second non‐type template parameter is reserved for further addition in case the `precision` parameter overloads are implemented for floating point conversions (in addition to the `format` parameter). The compile‐time "return value" of `ToCharsMaxLength` is an enumerator name `k_VALUE`. For usage examples see {Example 3: Determining The Required Buffer Size}. == Enums [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslalg/NumericFormatterUtil/ToCharsMaxLength/ValueType.adoc[`ValueType`] | Maximum buffer length required for the selected type and argument. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#