pad overloads

Synopses

Declared in <bslfmt_padutil.h>

Write padWidth copies of filler through the specified output iterator. Write padWidth copies of the specified single‐character filler. Write padWidth copies of the specified single‐character filler.

template<class t_ITERATOR>
static
t_ITERATOR
pad(
    t_ITERATOR out,
    std::ptrdiff_t padWidth,
    char filler);

Write padWidth copies of the specified single wide‐character filler.

template<class t_ITERATOR>
static
t_ITERATOR
pad(
    t_ITERATOR out,
    std::ptrdiff_t padWidth,
    wchar_t filler);

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.

template<class t_ITERATOR>
static
t_ITERATOR
pad(
    t_ITERATOR out,
    std::ptrdiff_t padWidth,
    std::string_view const& filler);

Same as the preceding pad overload, for wide string fillers.

template<class t_ITERATOR>
static
t_ITERATOR
pad(
    t_ITERATOR out,
    std::ptrdiff_t padWidth,
    std::wstring_view const& filler);

Created with MrDocs