Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
But why?
This is usually the case in languages with immutable strings, because concatenation recreates the string every time. But it is not the case in C++ because
std::stringmaintains a dynamic, growable buffer (andstd::ostringstreamis very likely to maintain astd::string, or some other contiguous buffer internally anyway), without a need for recreating the whole instance, so how does a stream actually help with many concatenations?It has much less overhead for repeated concatenations, especially with larger datasets.
I am not sure why? Streams are good for formatting, but how they help with concatenation?
rejected:
using namespace std;std::ostringstreamis much more preferable thanstd::stringwhen doing lots of concatenationsClojure Translation added
Clojure translation added
C++ translation added
C++ translation added
I published the translation of this Kata but I cant see it in the list