[#absl-Format] = xref:absl.adoc[absl]::Format :relfileprefix: ../ :mrdocs: Writes a formatted string to an arbitrary sink object (implementing the `absl::FormatRawSink` interface), using a format string and zero or more additional arguments. == Synopsis Declared in `<absl/strings/str_format.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename... Args> bool Format( xref:absl/FormatRawSink.adoc[FormatRawSink] raw_sink, xref:absl/FormatSpec.adoc[FormatSpec<Args...>] const& format, Args const&... args); ---- == Description By default, `std::string`, `std::ostream`, and `absl::Cord` are supported as destination objects. If a `std::string` is used the formatted string is appended to it. `absl::Format()` is a generic version of `absl::StrAppendFormat()`, for custom sinks. The format string, like format strings for `StrFormat()`, is checked at compile‐time. On failure, this function returns `false` and the state of the sink is unspecified. == Return Value `true` on success, `false` on error. == Parameters [cols="1,4"] |=== | Name| Description | *raw_sink* | The sink that receives the formatted output. | *format* | The format string. | *args* | The arguments substituted into the format string. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#