Writes to stdout given a format string and zero or more arguments.
Declared in <absl/strings/str_format.h>
template<typename... Args>
int
PrintF(
FormatSpec<Args...> const& format,
Args const&... args);
This function is functionally equivalent to std::printf() (and type-safe); prefer absl::PrintF() over std::printf().
Example:
std::string_view s = "Ulaanbaatar"; absl::PrintF("The capital of Mongolia is %s", s);
Outputs: "The capital of Mongolia is Ulaanbaatar"
The number of characters written, or a negative value on error.
| Name | Description |
|---|---|
| format | The format string. |
| args | The arguments substituted into the format string. |