Skip to content

Commit 55b8730

Browse files
committed
[format.string.std] Fix example
1 parent 837d6c9 commit 55b8730

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

source/utilities.tex

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15901,8 +15901,6 @@
1590115901
The \fmtgrammarterm{align} option applies to all argument types.
1590215902
The meaning of the various alignment options is as specified in \tref{format.align}.
1590315903
\begin{example}
15904-
%FIXME: example is incomplete, sB and sC result in:
15905-
%Error: Invalid UTF-8 byte sequence.
1590615904
\begin{codeblock}
1590715905
char c = 120;
1590815906
string s0 = format("{:6}", 42); // value of \tcode{s0} is \tcode{"\ \ \ \ 42"}
@@ -15916,8 +15914,8 @@
1591615914
string s8 = format("{:02}", 1234); // value of \tcode{s8} is \tcode{"1234"}
1591715915
string s9 = format("{:*<}", "12"); // value of \tcode{s9} is \tcode{"12"}
1591815916
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}"}
1592115919
\end{codeblock}
1592215920
\end{example}
1592315921
\begin{note}
@@ -17139,9 +17137,6 @@
1713917137
then \placeholder{C} is appended unchanged.
1714017138
\end{itemize}
1714117139

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).
1714517140
\begin{example}
1714617141
\begin{codeblock}
1714717142
string s0 = format("[{}]", "h\tllo"); // \tcode{s0} has value: \tcode{[h\ \ \ \ llo]}

0 commit comments

Comments
 (0)