|
15901 | 15901 | The \fmtgrammarterm{align} option applies to all argument types.
|
15902 | 15902 | The meaning of the various alignment options is as specified in \tref{format.align}.
|
15903 | 15903 | \begin{example}
|
15904 |
| -%FIXME: example is incomplete, sB and sC result in: |
15905 |
| -%Error: Invalid UTF-8 byte sequence. |
15906 | 15904 | \begin{codeblock}
|
15907 | 15905 | char c = 120;
|
15908 | 15906 | string s0 = format("{:6}", 42); // value of \tcode{s0} is \tcode{"\ \ \ \ 42"}
|
|
15916 | 15914 | string s8 = format("{:02}", 1234); // value of \tcode{s8} is \tcode{"1234"}
|
15917 | 15915 | string s9 = format("{:*<}", "12"); // value of \tcode{s9} is \tcode{"12"}
|
15918 | 15916 | string sA = format("{:*<6}", "12345678"); // value of \tcode{sA} is \tcode{"12345678"}
|
15919 |
| -string sB = format("{:@\importexample[-2pt]{example_05}\caret{}@6}", "x"); // value of \tcode{sB} is \tcode{"\importexample[-2pt]{example_05}\importexample[-2pt]{example_05}x\importexample[-2pt]{example_05}\importexample[-2pt]{example_05}\importexample[-2pt]{example_05}"} |
15920 |
| -string sC = format("{:*@\caret{}@6}", "@\importexample[-2pt]{example_05}@"); // value of \tcode{sC} is \tcode{"\importexample[-2pt]{example_05}\importexample[-2pt]{example_05}\importexample[-2pt]{example_05}"} |
| 15917 | +string sB = format("{:@\importexample[-2pt]{example_05}\kern0.75pt\caret{}@6}", "x"); // value of \tcode{sB} is \tcode{"\importexample[-2pt]{example_05}\importexample[-2pt]{example_05}x\importexample[-2pt]{example_05}\importexample[-2pt]{example_05}\importexample[-2pt]{example_05}"} |
| 15918 | +string sC = format("{:*@\caret{}@6}", "@\importexample[-2pt]{example_05}\kern0.75pt\importexample[-2pt]{example_05}\kern0.75pt\importexample[-2pt]{example_05}\kern0.75pt@"); // value of \tcode{sC} is \tcode{"\importexample[-2pt]{example_05}\importexample[-2pt]{example_05}\importexample[-2pt]{example_05}"} |
15921 | 15919 | \end{codeblock}
|
15922 | 15920 | \end{example}
|
15923 | 15921 | \begin{note}
|
|
17139 | 17137 | then \placeholder{C} is appended unchanged.
|
17140 | 17138 | \end{itemize}
|
17141 | 17139 |
|
17142 |
| -%% FIXME: Example is incomplete; s2 and s6 from P2286R8 |
17143 |
| -%% and s8 (which should be s9) from P2713R1 are missing below; |
17144 |
| -%% FIXME: their Unicode characters are not available in our font (Latin Modern). |
17145 | 17140 | \begin{example}
|
17146 | 17141 | \begin{codeblock}
|
17147 | 17142 | string s0 = format("[{}]", "h\tllo"); // \tcode{s0} has value: \tcode{[h\ \ \ \ llo]}
|
|
0 commit comments