[#BloombergLP-bslfmt-PadUtil-pad-01] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslfmt.adoc[bslfmt]::xref:BloombergLP/bslfmt/PadUtil.adoc[PadUtil]::pad :relfileprefix: ../../../ :mrdocs: Write `filler` to `out` the specified `padWidth` times. == Synopsis Declared in `<bslfmt_padutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class t_ITERATOR> static t_ITERATOR pad( t_ITERATOR out, std::ptrdiff_t padWidth, std::string_view const& filler); ---- == Description Write the specified `filler` (possibly a multi‐byte unicode sequence) to the specified `out` the specified `padWidth` times and return the new output iterator. If `padWidth < 0`, no output is done. The behavior is undefined unless the character type of `filler` is the same as `t_CHAR` or `filler` is entirely ascii. Note that the overloads that input a single character have an advantage over `bsl::fill_n` in that they will automatically widen or narrow the input character to `t_CHAR` if necessary. == Return Value the output iterator after writing the filler repetitions == Parameters [cols="1,4"] |=== | Name| Description | *out* | output iterator receiving the filler repetitions | *padWidth* | number of times to write `filler`; no output if `< 0` | *filler* | character sequence written as each padding unit |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#