Stroika's format string: it always formats WIDE - each argument as std::formatter<T, wchar_t> formats it - into a String; written narrow ("..."_f) only as a terser spelling, so then it must be ASCII. More...
#include <Format.h>
Public Member Functions | |
| constexpr wstring_view | get () const |
| constexpr qStroika_Foundation_Characters_FMT_PREFIX_::wstring_view | getx_ () const |
| the format string as the formatting library's own wstring_view (std's, or fmtlib's) - only for calling Common::StdCompat::vformat directly | |
| template<IFormattable... ARGS> | |
| String | operator() (ARGS &&... args) const |
| format args - checked against the format string at run time: a mismatch throws format_error (a FormatLiteral, "..."_f, checks at compile time) | |
| template<IFormattable... ARGS> | |
| String | operator() (const locale &loc, ARGS &&... args) const |
| As above, with a locale. | |
Stroika's format string: it always formats WIDE - each argument as std::formatter<T, wchar_t> formats it - into a String; written narrow ("..."_f) only as a terser spelling, so then it must be ASCII.
A narrow format string (FormatString<char>) must be ASCII - so what it means cannot depend on the compiler's narrow character set. A wide one may be any UNICODE, and so may what is formatted into either - a String, say.
But EITHER way it produces a fully UNICODE String, and all the conversions - {} - are UNICODE.
For narrow output instead - a std::string, in the program's narrow character set - use std::format with a narrow format string. Stroika's own types format there too (a String as AsNarrowSDKString (eIgnoreErrors) gives it), but not what only _f adds: the types std::format cannot format, formatted through their Characters::ToString (
Definition at line 103 of file Characters/Format.h.
|
constexpr |
This retrieves the underlying string data - for the format string itself (regardless of how created, as a wstring_view).
Definition at line 107 of file Characters/Format.inl.