[#bsl-format-0a]
= xref:bsl.adoc[bsl]::format
:relfileprefix: ../
:mrdocs:

Format the specified `args` according to the specification given by the specified `fmtStr` in the locale of the specified `loc` and return the result&period; In the event of an error throw the exception `format&lowbar;error`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class&period;&period;&period; t&lowbar;ARGS&gt;
xref:bsl/wstring.adoc[bsl::wstring]
format(
    std::locale const& loc,
    wformat&lowbar;string&lt;t&lowbar;ARGS&period;&period;&period;&gt; fmtStr,
    t&lowbar;ARGS&&&period;&period;&period; args);
----


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