mirror of
https://github.com/shadps4-emu/ext-fmt.git
synced 2024-11-27 03:30:32 +00:00
Improve docs
This commit is contained in:
parent
4db5723525
commit
71677e5204
10
doc/api.rst
10
doc/api.rst
@ -39,12 +39,10 @@ They take *fmt* and *args* as arguments.
|
|||||||
|
|
||||||
*fmt* is a format string that contains literal text and replacement fields
|
*fmt* is a format string that contains literal text and replacement fields
|
||||||
surrounded by braces ``{}``. The fields are replaced with formatted arguments
|
surrounded by braces ``{}``. The fields are replaced with formatted arguments
|
||||||
in the resulting string. A function taking *fmt* doesn't participate in an
|
in the resulting string. `fmt::format_string` is a format string which can be
|
||||||
overload resolution if the latter is not a string.
|
constructed from a string literal or a ``constexpr`` string and is checked at
|
||||||
|
compile time in C++20. To pass a runtime format string wrap it in
|
||||||
Most formatting functions such as `fmt::format` require a format string to
|
`fmt::runtime`.
|
||||||
be known at compile time, i.e. be a string literal or a ``constexpr`` string.
|
|
||||||
To pass a runtime format string wrap it in `fmt::runtime`.
|
|
||||||
|
|
||||||
*args* is an argument list representing objects to be formatted.
|
*args* is an argument list representing objects to be formatted.
|
||||||
|
|
||||||
|
@ -2972,7 +2972,7 @@ FMT_API auto vformat(string_view fmt, format_args args) -> std::string;
|
|||||||
**Example**::
|
**Example**::
|
||||||
|
|
||||||
#include <fmt/core.h>
|
#include <fmt/core.h>
|
||||||
std::string message = fmt::format("The answer is {}", 42);
|
std::string message = fmt::format("The answer is {}.", 42);
|
||||||
\endrst
|
\endrst
|
||||||
*/
|
*/
|
||||||
template <typename... T>
|
template <typename... T>
|
||||||
|
Loading…
Reference in New Issue
Block a user