4 ms·
The Google way of doing this is absl::StrCat() [1]. [1] https://abseil.io/docs/cpp/guides/strings https://abseil.io/docs/cpp/guides/strings
by utopcell 6y ago
The Google way of doing this is absl::StrCat() [1].
[1] https://abseil.io/docs/cpp/guides/strings https://abseil.io/docs/cpp/guides/strings
- exebook 6y agoC++ of course can have better results because of constructors and templates, my code is for C and I honestly was sure, and for many years until yesterday, that this kind of sugar is basically impossible to achieve in C.
- qalmakka 6y agoWith modern C++ you can use the {fmt} library, which is so awesome it became part of the C++20 standard as `std:: format`.