#include <evo/impl/str.h>
Holds integer 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:
123,0x000A,0x0014
__123
5,710
◆ FmtSetInt() [1/2]
Main constructor with all attributes.
- Parameters
-
base | Formatting base to use (see FmtBase), fbCURRENT for unspecified (default: fDEC) |
prefix | Formatting prefix to use (see FmtBasePrefix), fbpCURRENT for unspecified (default: fPREFIX0) |
width | Width to pad to, -1 for unspecified (default: 0) |
ch | Padding character to use, 0 for unspecified (default: '0') |
◆ FmtSetInt() [2/2]
FmtSetInt |
( |
int |
base, |
|
|
int |
width, |
|
|
char |
ch = 0 |
|
) |
| |
|
inline |
Short constructor without prefix.
- Parameters
-
base | Formatting base to use (see FmtBase), fbCURRENT for unspecified (default: fDEC) |
width | Width to pad to, -1 for unspecified (default: 0) |
ch | Padding character to use, 0 for unspecified (default: '0') |
◆ merge()
Merge source attributes (used internally).
- This copies attributes from src that aren't "unspecified"
- Parameters
-
◆ reset()
Reset attributes to defaults (not unspecified).
◆ base
Base for formatting (default: fDEC)
◆ pad_ch
Fill character, 0 if unspecified (use baseline or default) (default: '0')
◆ pad_width
Width to fill to, 0 for none, -1 if unspecified (use baseline or default) (default: 0)
◆ prefix
Formatting prefix type (default: fPREFIX0)
The documentation for this struct was generated from the following file: