[#bsl-format_to-0c]
= xref:bsl.adoc[bsl]::format&lowbar;to
:relfileprefix: ../
:mrdocs:

`format&lowbar;to` overloads

== Synopses

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

Format `args` per `fmtStr` into the string addressed by `out`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class t&lowbar;STRING,
    class&period;&period;&period; t&lowbar;ARGS&gt;
requires (bsl&colon;&colon;is&lowbar;same&lowbar;v&lt;t&lowbar;STRING, bsl&colon;&colon;string&gt;)
void
xref:bsl/format_to-080.adoc[format&lowbar;to](
    t&lowbar;STRING* out,
    format&lowbar;string&lt;t&lowbar;ARGS&period;&period;&period;&gt; fmtStr,
    t&lowbar;ARGS&&&period;&period;&period; args);
----

[.small]#xref:bsl/format_to-080.adoc[_» more&period;&period;&period;_]#

Format `args` per `fmtStr` into the string addressed by `out`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class t&lowbar;STRING,
    class&period;&period;&period; t&lowbar;ARGS&gt;
requires (bsl&colon;&colon;is&lowbar;same&lowbar;v&lt;t&lowbar;STRING, bsl&colon;&colon;wstring&gt;)
void
xref:bsl/format_to-01.adoc[format&lowbar;to](
    t&lowbar;STRING* out,
    wformat&lowbar;string&lt;t&lowbar;ARGS&period;&period;&period;&gt; fmtStr,
    t&lowbar;ARGS&&&period;&period;&period; args);
----

[.small]#xref:bsl/format_to-01.adoc[_» more&period;&period;&period;_]#

Format `args` per `fmtStr` into `out` using locale `loc`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class t&lowbar;STRING,
    class&period;&period;&period; t&lowbar;ARGS&gt;
requires (bsl&colon;&colon;is&lowbar;same&lowbar;v&lt;t&lowbar;STRING, bsl&colon;&colon;string&gt;)
void
xref:bsl/format_to-086.adoc[format&lowbar;to](
    t&lowbar;STRING* out,
    std::locale const& loc,
    format&lowbar;string&lt;t&lowbar;ARGS&period;&period;&period;&gt; fmtStr,
    t&lowbar;ARGS&&&period;&period;&period; args);
----

[.small]#xref:bsl/format_to-086.adoc[_» more&period;&period;&period;_]#

Format `args` per `fmtStr` into `out` using locale `loc`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class t&lowbar;STRING,
    class&period;&period;&period; t&lowbar;ARGS&gt;
requires (bsl&colon;&colon;is&lowbar;same&lowbar;v&lt;t&lowbar;STRING, bsl&colon;&colon;wstring&gt;)
void
xref:bsl/format_to-04.adoc[format&lowbar;to](
    t&lowbar;STRING* out,
    std::locale const& loc,
    wformat&lowbar;string&lt;t&lowbar;ARGS&period;&period;&period;&gt; fmtStr,
    t&lowbar;ARGS&&&period;&period;&period; args);
----

[.small]#xref:bsl/format_to-04.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *out*
| address of the string receiving formatted characters
| *fmtStr*
| format string
| *args*
| values to format
| *loc*
| locale used for locale&hyphen;dependent formatting
|===


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