Specifies the formatting of a String::format operation.
More...
#include <String.h>
|
| int | precision { 6 } |
| | The precision (i.e. how many digits are generated) of floating point numbers output with this format. See std::ios::precision. More...
|
| |
| Base | base { Base::Dec } |
| | The base used to display integer types. See std::ios::base. More...
|
| |
| Align | alignment { Align::Left } |
| | Alignment used with width. See std::ios::left and std::ios::right. More...
|
| |
| int | width { 0 } |
| | Width used on some format operations. See std::ios::width. More...
|
| |
| char | fill { ' ' } |
| | Filler used to fill whitespace in width formats. See std::ios::fill. More...
|
| |
Specifies the formatting of a String::format operation.
Example
String::Format fmt;
fmt.precision = 3;
String my_string = String::format(fmt, 2.1337);
will result in
my_string = "2.13"
◆ Align
◆ Base
◆ operator<<
| std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const Format & |
fmt |
|
) |
| |
|
friend |
◆ alignment
| Align String::Format::alignment { Align::Left } |
Alignment used with width. See std::ios::left and std::ios::right.
◆ base
| Base String::Format::base { Base::Dec } |
The base used to display integer types. See std::ios::base.
◆ fill
| char String::Format::fill { ' ' } |
Filler used to fill whitespace in width formats. See std::ios::fill.
◆ precision
| int String::Format::precision { 6 } |
The precision (i.e. how many digits are generated) of floating point numbers output with this format. See std::ios::precision.
◆ width
| int String::Format::width { 0 } |
Width used on some format operations. See std::ios::width.
The documentation for this struct was generated from the following file: