| ... | @@ -32,9 +32,11 @@ pub const FormatOptions = struct { | ... | @@ -32,9 +32,11 @@ pub const FormatOptions = struct { |
| 32 | /// this format: | 32 | /// this format: |
| 33 | /// `{[argument][specifier]:[fill][alignment][width].[precision]}` | 33 | /// `{[argument][specifier]:[fill][alignment][width].[precision]}` |
| 34 | /// | 34 | /// |
| 35 | /// Each word between `[` and `]` is a parameter you have to replace with something: | 35 | /// Above, each word including its surrounding [ and ] is a parameter which you have to replace with something: |
| 36 | /// | 36 | /// |
| 37 | /// - *argument* is either the index or the name of the argument that should be inserted | 37 | /// - *argument* is either the numeric index or the field name of the argument that should be inserted |
| | 38 | /// - when using a field name, you are required to enclose the field name (an identifier) in square |
| | 39 | /// brackets, e.g. {[score]...} as opposed to the numeric index form which can be written e.g. {2...} |
| 38 | /// - *specifier* is a type-dependent formatting option that determines how a type should formatted (see below) | 40 | /// - *specifier* is a type-dependent formatting option that determines how a type should formatted (see below) |
| 39 | /// - *fill* is a single character which is used to pad the formatted text | 41 | /// - *fill* is a single character which is used to pad the formatted text |
| 40 | /// - *alignment* is one of the three characters `<`, `^` or `>`. they define if the text is *left*, *center*, or *right* aligned | 42 | /// - *alignment* is one of the three characters `<`, `^` or `>`. they define if the text is *left*, *center*, or *right* aligned |