Skip to content

Commit 524a583

Browse files
committed
Add doc on the support for other string literals
1 parent c1603b6 commit 524a583

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

doc/modules/ROOT/pages/format.adoc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,18 @@ For example with `{:10.3e}`:
7070

7171
Note the space at the front of these string to keep with width at 10 characters
7272

73+
=== String Literal Support
74+
75+
If you want the result to be a different string width than `char` you can specify this with the format string.
76+
For example if you want the result to be `wchar_t` you can use `L"{}"`.
77+
`wchar_t`, `char16_t`, `char32_t` are supported from pass:[C++17].
78+
`char8_t` is supported from pass:[C++20].
79+
7380
=== Putting it All Together
7481

7582
The appropriate order for the full format specifier is:
7683

77-
Locale, Sign, Padding, Precision, Type
84+
String literal pass:["{Locale, Sign, Padding, Precision, Type}"]
7885

7986
=== Examples
8087

0 commit comments

Comments
 (0)