[#BloombergLP-bslfmt-vformat-0f]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslfmt.adoc[bslfmt]::vformat
:relfileprefix: ../../
:mrdocs:

Format `args` according to `fmtStr` using the given allocator&period;

== Synopsis

Declared in `&lt;bslfmt&lowbar;format&lowbar;imp&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/string.adoc[bsl::string]
vformat(
    xref:bsl/allocator-0df.adoc[bsl::allocator&lt;char&gt;] alloc,
    std::string&lowbar;view fmtStr,
    xref:BloombergLP/bslfmt/format_args.adoc[format&lowbar;args] args);
----

== Description

Format the specified `args` according to the specification given by the specified `fmtStr`, using the specified `allocator` to supply memory (if required), and return the result&period; In the event of an error the exception `format&lowbar;error` is thrown&period;

== Return Value

the formatted string

== Parameters

[cols="1,4"]
|===
| Name| Description
| *alloc*
| allocator used to supply memory
| *fmtStr*
| format string
| *args*
| type&hyphen;erased format arguments
|===


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