|
My naive solution would be simple: Iterate over the array, add the string length of its members, add the required storage for any suppliedseparator, allocate the target string to the right, and memcpy() the array members(and any separators) over to their final location.
This is not supported by the current low-level API. You cannot create string object
without supplying it's contents. It is possible to implement this, but the change will be quite intrusive(supporting temporary TString value that is not registered in the global hash) or verbose (calculating hash value of resulting string before allocating it,
adding a 3rd pass over source data).