[#mp_units-utility-write_padded]
= xref:mp_units.adoc[mp&lowbar;units]::xref:mp_units/utility.adoc[utility]::write&lowbar;padded
:relfileprefix: ../../
:mrdocs:

Writes a string to an output iterator with fill&sol;align&sol;width padding&period;

== Synopsis

Declared in `&lt;mp&hyphen;units&sol;utility&sol;format&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename Char,
    std::output&lowbar;iterator&lt;Char&gt; Out&gt;
constexpr
Out
write&lowbar;padded(
    Out out,
    std::basic&lowbar;string&lowbar;view&lt;Char&gt; s,
    int width,
    xref:mp_units/utility/fmt_align.adoc[fmt&lowbar;align] align,
    xref:mp_units/utility/fill_t.adoc[fill&lowbar;t&lt;Char&gt;] const& fill);
----

== Description

Avoids instantiating format&lowbar;to&sol;vformat&lowbar;to infrastructure for the common padding use&hyphen;case inside formatter&lt;Unit&gt;, formatter&lt;Dimension&gt;, and formatter&lt;quantity&gt; specializations&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *s*
| A non&hyphen;owning reference to a string&period;
|===


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