This class serves as a namespace for some static functions that are useful in creating specializations of bsl::formatter to support bsl::format.
Declared in <bdlt_formatutil.h>
template<class t_CHAR>
class FormatUtil;
| Name |
|---|
StringView |
| Name | Description |
|---|---|
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. |
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). |