Daily bit(e) of C++ | std::format_to, std::format_to_n
Daily bit(e) of C++ #415, The formatting functions that output to an iterator: std::format_to, std::format_to_n.
The C++20 <format> introduced a modern approach to text formatting.
When formatting to a buffer or a stream, the std::string returning std::format may not be suitable.
The library offers two overloads that instead output the formatted text through an output iterator: std::format_to and std::format_to_n, which also limits the number of characters written.