[#boost-urls-format_to-01]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::format&lowbar;to
:relfileprefix: ../../
:mrdocs:

Format arguments into a URL

== Synopses

Declared in `&lt;https://www.github.com/boostorg/url/blob/develop/include/boost/url/format.hpp#Lundefined[boost&sol;url&sol;format&period;hpp]&gt;`

Format arguments into a URL


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:boost/urls/format_to-0b.adoc[format&lowbar;to](
    xref:boost/urls/url_base.adoc[url&lowbar;base]& u,
    core::string&lowbar;view fmt,
    std::initializer&lowbar;list&lt;format&lowbar;arg&gt; args);
----

[.small]#xref:boost/urls/format_to-0b.adoc[_» more&period;&period;&period;_]#

Format arguments into a URL


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;std::convertible&lowbar;to&lt;format&lowbar;arg&gt;&period;&period;&period; Args&gt;
void
xref:boost/urls/format_to-02.adoc[format&lowbar;to](
    xref:boost/urls/url_base.adoc[url&lowbar;base]& u,
    core::string&lowbar;view fmt,
    Args&&&period;&period;&period; args);
----

[.small]#xref:boost/urls/format_to-02.adoc[_» more&period;&period;&period;_]#

== Exceptions

[cols="1,4"]
|===
| Name
| Thrown on
| `system&lowbar;error`
| `fmt` contains an invalid format string and `u` contains an invalid URL after replacements are applied&period;
|===

== Parameters

[cols="1,4"]
|===
|Name|Description

| *u*
| An object that derives from xref:boost/urls/url_base.adoc[`url&lowbar;base`]&period;
| *fmt*
| The format URL string&period;
| *args*
| Arguments to be formatted&period;
|===

== See Also

xref:boost/urls/format-06.adoc[`format`]&period;


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