Clarify that format_to[_n] do not append a terminating null

This commit is contained in:
Victor Zverovich
2021-08-29 12:07:35 -07:00
parent cb0f177c35
commit c1313c2057

View File

@ -2994,7 +2994,7 @@ auto vformat_to(OutputIt out, string_view fmt, format_args args) -> OutputIt {
\rst \rst
Formats ``args`` according to specifications in ``fmt``, writes the result to Formats ``args`` according to specifications in ``fmt``, writes the result to
the output iterator ``out`` and returns the iterator past the end of the output the output iterator ``out`` and returns the iterator past the end of the output
range. range. `format_to` does not append a terminating null character.
**Example**:: **Example**::
@ -3032,6 +3032,7 @@ auto vformat_to_n(OutputIt out, size_t n, string_view fmt, format_args args)
Formats ``args`` according to specifications in ``fmt``, writes up to ``n`` Formats ``args`` according to specifications in ``fmt``, writes up to ``n``
characters of the result to the output iterator ``out`` and returns the total 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. (not truncated) output size and the iterator past the end of the output range.
`format_to_n` does not append a terminating null character.
\endrst \endrst
*/ */
template <typename OutputIt, typename... T, template <typename OutputIt, typename... T,