fmt::format_to_n

Formats args according to specifications in fmt, with an exotic (non-char, non-wchar_t) character type, writes up to n characters of the result to the output iterator out and returns the total (not truncated) output size and the iterator past the end of the output range.

Synopsis

Declared in <fmt/xchar.h>

template<
    typename OutputIt,
    typename S,
    typename... T,
    typename Char = /* implementation-defined */>
format_to_n_result<OutputIt>
format_to_n(
    OutputIt out,
    size_t n,
    S const& fmt,
    T&&... args);

Return Value

The total (not truncated) output size and the iterator past the end of the output range.

Parameters

NameDescription
outThe output iterator to write to.
nThe maximum number of characters to write.
fmtThe format string.
argsThe arguments to format.