mirror of
https://github.com/shadps4-emu/ext-fmt.git
synced 2024-11-23 09:49:42 +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
|
||||
surrounded by braces ``{}``. The fields are replaced with formatted arguments
|
||||
in the resulting string. A function taking *fmt* doesn't participate in an
|
||||
overload resolution if the latter is not a string.
|
||||
|
||||
Most formatting functions such as `fmt::format` require a format string to
|
||||
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`.
|
||||
in the resulting string. `fmt::format_string` is a format string which can be
|
||||
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
|
||||
`fmt::runtime`.
|
||||
|
||||
*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**::
|
||||
|
||||
#include <fmt/core.h>
|
||||
std::string message = fmt::format("The answer is {}", 42);
|
||||
std::string message = fmt::format("The answer is {}.", 42);
|
||||
\endrst
|
||||
*/
|
||||
template <typename... T>
|
||||
|
Loading…
Reference in New Issue
Block a user