#include <evo/impl/str.h>
Holds floating point formatting attributes.
- Used with operator<<() on String, Stream, and StreamOut
- This uses "unspecified" defaults, which means default attributes depend on the output object used, which uses configured formatting state or real defaults if no formatting state kept
- Example
Output:
|
| char | pad_ch |
| | Padding character, 0 to ignore (leave current fill character) (default: '0') More...
|
| |
| char | pad_ch_sp |
| | Padding character used with special value (inf or nan), 0 to ignore (leave current fill character) (default: ' ') More...
|
| |
| int | pad_width |
| | Width to fill to, 0 for none, -1 to ignore (leave current width) (default: 0) More...
|
| |
| int | precision |
| | Floating point precision (number of digits after decimal), fPREC_AUTO for automatic (default: fPREC_AUTO) More...
|
| |
◆ FmtSetFloat()
Constructor with all attributes.
- Parameters
-
| precision | Precision to use (number of digits after decimal), fPREC_AUTO for automatic (default: fPREC_AUTO) |
| width | Width to pad to, -1 for unspecified (default: 0) |
| ch | Padding character to use, 0 for unspecified (default: '0') |
| ch_sp | Special padding character to use when formatting special values like "inf" or "nan" (default: ' ') |
◆ merge()
Merge from source (used internally).
- This copies explicit values from src, but ignores "leave current" values
- Parameters
-
◆ reset()
Reset to defaults.
- Returns
- This
◆ pad_ch
Padding character, 0 to ignore (leave current fill character) (default: '0')
◆ pad_ch_sp
Padding character used with special value (inf or nan), 0 to ignore (leave current fill character) (default: ' ')
◆ pad_width
Width to fill to, 0 for none, -1 to ignore (leave current width) (default: 0)
◆ precision
Floating point precision (number of digits after decimal), fPREC_AUTO for automatic (default: fPREC_AUTO)
The documentation for this struct was generated from the following file: