Writes to an output stream given a format string and zero or more arguments, generally in a manner that is more efficient than streaming the result of absl::StrFormat().
Declared in <absl/strings/str_format.h>
template<typename... Args>
[[nodiscard]]
str_format_internal::Streamable
StreamFormat(
FormatSpec<Args...> const& format,
Args const&... args);
The returned object must be streamed before the full expression ends.
Example:
std::cout << StreamFormat("%12.6f", 3.14);
A streamable object that writes the formatted output.
The return value should not be discarded.
| Name | Description |
|---|---|
| format | The format string. |
| args | The arguments substituted into the format string. |