Formatting Text in C++: The Old and The New Ways

When it comes to format a piece of text in C++ there are several ways you can employ: I/O streams, particularly std::stringstream with stream operations (such as operator <<) printf family of functions, particularly sprintf the C++20 format library, particularly std::format / std::format_to any 3rd party library, {fmt} in particular (the source of the new…