[#BloombergLP-bdlt-FormatUtil] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::FormatUtil :relfileprefix: ../../ :mrdocs: This `class` serves as a namespace for some static functions that are useful in creating specializations of `bsl::formatter` to support `bsl::format`. == Synopsis Declared in `<bdlt_formatutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class t_CHAR> class FormatUtil; ---- == Type Aliases [cols="1"] |=== | Name | xref:BloombergLP/bdlt/FormatUtil/StringView.adoc[`StringView`] |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdlt/FormatUtil/writeSecondFraction.adoc[`writeSecondFraction`] | Write the fraction of a second from the timeCache to `d_out`, where the `precision` is the number of digits of precision wanted. Use `decimalChar` (expected to be '.' or ',') as a decimal point, and if `precision == 0` output nothing. If `6 < precision`, write '0' characters following the first 6 digits. The behavior is undefined unless `0 <= millisecond < 1000`, `0 <= microsecond < 1000`, and `0 <= precision`. | xref:BloombergLP/bdlt/FormatUtil/writeZeroPaddedDigits.adoc[`writeZeroPaddedDigits`] | Write the specified `value` in decimal to the specified `out`. Always write the specified `numDigits` digits, '0'‐padding to the left if necessary. Return the iterator after output is done. The behavior is undefined unless `2 <= numDigits <= 6` and `0 <= value < pow(10, numDigits)`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#