Quick question: I’d like to glue a number of TString variables together and give this new combination of TStrings to a function as parameter. I do not need the combined string anywhere else only as a parameter in one function. Is there some elegant and quick way to do this without doing a sprintf or such, i.e. something like
In answer to your first post, I would recommend instead using TString::Format to create the rvalue TString. So instead of having three TStrings you could to MyFunction(TString::Format(“foo%sbaz”,“bar”) or something.
For the second, to convert between std::strings and TStrings you basically have to first get the underlying c-string. Something like: