File tree Expand file tree Collapse file tree 1 file changed +16
-10
lines changed Expand file tree Collapse file tree 1 file changed +16
-10
lines changed Original file line number Diff line number Diff line change 1
1
//! Support for fmt! expressions.
2
2
//!
3
3
//! The syntax is close to that of Posix format strings:
4
- //!
4
+ //!
5
5
//! ~~~~~~
6
6
//! Format := '%' Parameter? Flag* Width? Precision? Type
7
7
//! Parameter := [0-9]+ '$'
10
10
//! Precision := '.' [0-9]+
11
11
//! Type := [bcdfiostuxX?]
12
12
//! ~~~~~~
13
- //!
14
- //! * Parameter is the 1-based argument to apply the format to. Currently not implemented.
15
- //! * Flag 0 causes leading zeros to be used for padding when converting numbers.
16
- //! * Flag # causes the conversion to be done in an *alternative* manner. Currently not implemented.
17
- //! * Flag + causes signed numbers to always be prepended with a sign character.
13
+ //!
14
+ //! * Parameter is the 1-based argument to apply the format to. Currently not
15
+ //! implemented.
16
+ //! * Flag 0 causes leading zeros to be used for padding when converting
17
+ //! numbers.
18
+ //! * Flag # causes the conversion to be done in an *alternative* manner.
19
+ //! Currently not implemented.
20
+ //! * Flag + causes signed numbers to always be prepended with a sign
21
+ //! character.
18
22
//! * Flag - left justifies the result
19
- //! * Width specifies the minimum field width of the result. By default leading spaces are added.
20
- //! * Precision specifies the minimum number of digits for integral types and the minimum number
23
+ //! * Width specifies the minimum field width of the result. By default
24
+ //! leading spaces are added.
25
+ //! * Precision specifies the minimum number of digits for integral types
26
+ //! and the minimum number
21
27
//! of decimal places for float.
22
- //!
28
+ //!
23
29
//! The types currently supported are:
24
- //!
30
+ //!
25
31
//! * b - bool
26
32
//! * c - char
27
33
//! * d - int
You can’t perform that action at this time.
0 commit comments