Closed
Description
The idea is to make write_n() be a replacement for the snprintf() family of functions.
The reason this would be useful is to prevent fmt::BasicArrayWriter from throwing an exception when output cannot fit in the buffer. Currently one may wrap write() in a try block, but the element that caused the exception to be thrown will not be printed at all -- not even partially. Often it is desired to get partial output. One example is copying long strings (log or error messages). It is better to get some of the text instead of none of it.
Metadata
Assignees
Labels
No labels
Activity