[#bsl-vformat-0ef]
= xref:bsl.adoc[bsl]::vformat
:relfileprefix: ../
:mrdocs:

Format `args` according to `fmtStr` using allocator and locale&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/wstring.adoc[bsl::wstring]
vformat(
    xref:bsl/allocator-0df.adoc[allocator&lt;wchar&lowbar;t&gt;] alloc,
    std::locale const& loc,
    std::wstring&lowbar;view fmtStr,
    std::wformat&lowbar;args args);
----

== Description

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

== Return Value

the formatted wide string

== Parameters

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


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