[#absl-Format]
= xref:absl.adoc[absl]::Format
:relfileprefix: ../
:mrdocs:

Writes a formatted string to an arbitrary sink object (implementing the `absl&colon;&colon;FormatRawSink` interface), using a format string and zero or more additional arguments&period;

== Synopsis

Declared in `&lt;absl&sol;strings&sol;str&lowbar;format&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename&period;&period;&period; Args&gt;
bool
Format(
    xref:absl/FormatRawSink.adoc[FormatRawSink] raw&lowbar;sink,
    xref:absl/FormatSpec.adoc[FormatSpec&lt;Args&period;&period;&period;&gt;] const& format,
    Args const&&period;&period;&period; args);
----

== Description

By default, `std&colon;&colon;string`, `std&colon;&colon;ostream`, and `absl&colon;&colon;Cord` are supported as destination objects&period; If a `std&colon;&colon;string` is used the formatted string is appended to it&period;

`absl&colon;&colon;Format()` is a generic version of `absl&colon;&colon;StrAppendFormat()`, for custom sinks&period; The format string, like format strings for `StrFormat()`, is checked at compile&hyphen;time&period;

On failure, this function returns `false` and the state of the sink is unspecified&period;

== Return Value

`true` on success, `false` on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *raw&lowbar;sink*
| The sink that receives the formatted output&period;
| *format*
| The format string&period;
| *args*
| The arguments substituted into the format string&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
