|
| template<typename... ArgsT> |
| detail::FormatArgStore< char, detail::RemoveCvref< ArgsT >... > | make_format_args (const ArgsT &... args) |
| | Creates a type-erased argument store from a variadic argument list.
|
| template<typename... ArgsT> |
| FormatToNResult< char * > | format_to_n (char *out, size_t n, format_string< ArgsT... > fmt, const ArgsT &... args) |
| | Formats arguments into a char* buffer, writing at most n characters.
|
| template<size_t N, typename... ArgsT> |
| FormatToResult | format_to (char(&out)[N], format_string< ArgsT... > fmt, const ArgsT &... args) |
| | Formats arguments into a fixed-size char array.
|
| template<typename OutputItT, typename... ArgsT, std::enable_if_t< detail::kIsOutputIterator< detail::RemoveCvref< OutputItT > > &&!std::is_array_v< std::remove_reference_t< OutputItT > >, int > = 0> |
| detail::RemoveCvref< OutputItT > | format_to (OutputItT &&out, format_string< ArgsT... > fmt, const ArgsT &... args) |
| | Formats arguments to an output iterator.
|
Lightweight header-only {} placeholder formatter.
template<size_t N, typename... ArgsT>
Formats arguments into a fixed-size char array.
The array size N is deduced automatically. Equivalent to format_to_n(out, N, fmt, args...).
- Template Parameters
-
| N | Array size (deduced). |
| ArgsT | Argument types. |
- Parameters
-
| out | Destination char array. |
| fmt | Format string. |
| args | Format arguments. |
- Returns
FormatToResult with end pointer, total size and truncation flag.
template<typename... ArgsT>
Formats arguments into a char* buffer, writing at most n characters.
Placeholders ({}) in fmt are replaced in order by the corresponding argument from args. If more characters would be produced than n, output is truncated and the returned truncated flag is set. The caller must null-terminate the output if needed.
- Template Parameters
-
| ArgsT | Argument types (deduced). |
- Parameters
-
| out | Destination buffer. Must have capacity of at least n bytes. |
| n | Maximum number of characters to write (not counting a null terminator). |
| fmt | Format string with {} placeholders. |
| args | Format arguments. |
- Returns
FormatToNResult with the end pointer, total size and truncation flag.