#include <evo/impl/str.h>
template<class T>
struct evo::FmtIntT< T >
Explicitly format an integer.
- Used with operator<<() on String, Stream, and StreamOut
- Don't use FmtIntT directly, use one of the aliases:
- FmtShort, FmtInt, FmtLong, FmtLongL
- FmtInt8, FmtInt16, FmtInt32, FmtInt64
- FmtUShort, FmtUInt, FmtULong, FmtULongL
- FmtUInt8, FmtUInt16, FmtUInt32, FmtUInt64
- Example
Example using FmtInt
|
| FmtIntT (T num, int base=fbCURRENT, FmtBasePrefix prefix=fbpCURRENT, int width=-1, char ch=0) |
| Constructor for POD number type with all attributes. More...
|
|
| FmtIntT (const IntClass &num, int base=fbCURRENT, FmtBasePrefix prefix=fbpCURRENT, int width=-1, char ch=0) |
| Constructor for class number type (Int, etc) with all attributes. More...
|
|
This & | width (int width, char ch=0) |
| Helper for setting padding attributes. More...
|
|
◆ FmtFieldType
This type paired with field info.
◆ IntClass
◆ IntPod
◆ This
◆ FmtIntT() [1/2]
Constructor for POD number type with all attributes.
- Parameters
-
num | Number to format |
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') |
◆ FmtIntT() [2/2]
Constructor for class number type (Int, etc) with all attributes.
- Parameters
-
num | Number to format |
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') |
◆ width()
This& width |
( |
int |
width, |
|
|
char |
ch = 0 |
|
) |
| |
|
inline |
Helper for setting padding attributes.
- Parameters
-
width | Width to pad to, -1 for unspecified (default: 0) |
ch | Padding character to use, 0 for unspecified (default: '0') |
- Returns
- This
◆ fmt
◆ num
The documentation for this struct was generated from the following file: