|
14907 | 14907 | string s1 = format("{:6}", 'x'); // value of \tcode{s1} is \tcode{"x\ \ \ \ \ "}
|
14908 | 14908 | string s2 = format("{:*<6}", 'x'); // value of \tcode{s2} is \tcode{"x*****"}
|
14909 | 14909 | string s3 = format("{:*>6}", 'x'); // value of \tcode{s3} is \tcode{"*****x"}
|
14910 |
| -string s4 = format("{:*^6}", 'x'); // value of \tcode{s4} is \tcode{"**x***"} |
| 14910 | +string s4 = format("{:*@\caret{}@6}", 'x'); // value of \tcode{s4} is \tcode{"**x***"} |
14911 | 14911 | string s5 = format("{:6d}", c); // value of \tcode{s5} is \tcode{"\ \ \ 120"}
|
14912 | 14912 | string s6 = format("{:6}", true); // value of \tcode{s6} is \tcode{"true\ \ "}
|
14913 | 14913 | string s7 = format("{:*<6.3}", "123456"); // value of \tcode{s7} is \tcode{"123***"}
|
|
15052 | 15052 | string s1 = format("{:+06d}", c); // value of \tcode{s1} is \tcode{"+00120"}
|
15053 | 15053 | string s2 = format("{:#06x}", 0xa); // value of \tcode{s2} is \tcode{"0x000a"}
|
15054 | 15054 | string s3 = format("{:<06}", -42); // value of \tcode{s3} is \tcode{"-42\ \ \ "} (\tcode{0} has no effect)
|
15055 |
| -string s4 = format("{:06}", inf); // value of \tcode{s4} is \tcode{" inf"} (\tcode{0} has no effect) |
| 15055 | +string s4 = format("{:06}", inf); // value of \tcode{s4} is \tcode{"\ \ \ inf"} (\tcode{0} has no effect) |
15056 | 15056 | \end{codeblock}
|
15057 | 15057 | \end{example}
|
15058 | 15058 |
|
|
16136 | 16136 | %% FIXME: their Unicode characters are not available in our font (Latin Modern).
|
16137 | 16137 | \begin{example}
|
16138 | 16138 | \begin{codeblock}
|
16139 |
| -string s0 = format("[{}]", "h\tllo"); // \tcode{s0} has value: \tcode{[h llo]} |
| 16139 | +string s0 = format("[{}]", "h\tllo"); // \tcode{s0} has value: \tcode{[h\ \ \ \ llo]} |
16140 | 16140 | string s1 = format("[{:?}]", "h\tllo"); // \tcode{s1} has value: \tcode{["h\textbackslash tllo"]}
|
16141 | 16141 | string s3 = format("[{:?}, {:?}]", '\'', '"'); // \tcode{s3} has value: \tcode{['\textbackslash '', '"']}
|
16142 | 16142 |
|
|
0 commit comments